• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
weird problem setting config indexes

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

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

I'm autoloading the url helper as well.

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.


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.

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


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

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