CodeIgniter Forums
Strange Issue when trying to use a model? - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: Strange Issue when trying to use a model? (/showthread.php?tid=29435)



Strange Issue when trying to use a model? - El Forum - 04-09-2010

[eluser]Mischievous[/eluser]
I have created a config_model class that extends the model library to load site configuration for the rest of the controllers etc. etc. and it seems when i try to use this model I get an error generated by the url helper

Code:
Fatal error: Call to a member function slash_item() on a non-object in ..\system\helpers\url_helper.php on line 64

I've checked the line and its in the function base_url() that calls to $CI->config->slash_item('base_url')?? Not sure why it would be doing this? Its as if the CI instance isn't properly setting up. When I take the model out of autoload it disappears??

Any Thoughts?


Strange Issue when trying to use a model? - El Forum - 04-09-2010

[eluser]danmontgomery[/eluser]
Is your config model overwriting the config library in $CI->config?