• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
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


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.