Welcome Guest, Not a member yet? Register   Sign In
weird problem setting config indexes
#1

[eluser]stormbytes[/eluser]
I'm autoloading a custom config file (app/config/arrow.php) with the following index:
Code:
$config['login_validation_url'] = site_url().'login/authorize';

For some reason I get an error when loading the application:
Code:
Fatal error: Call to undefined function site_url()

I'm autoloading the url helper as well.
#2

[eluser]InsiteFX[/eluser]
Did you autoload the url_helper ?

It could be that your config is being loaded before the url_helper. Which would mean that you would have to manually load it in a controller or some where else.

InsiteFX
#3

[eluser]stormbytes[/eluser]
Yes I autoloaded the Url Helper. You are correct about the helper being loaded after the config file. This is weird since the helper array is located above the config array (and in theory should be loaded before hand).

Bah! I'm going back to KISS.
#4

[eluser]InsiteFX[/eluser]
You could try this and see if it works!
Code:
$config['login_validation_url'] = $this->config->site_url('login/authorize');

InsiteFX




Theme © iAndrew 2016 - Forum software by © MyBB