CodeIgniter Forums
Loading Models Within Core System Classes - 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: Loading Models Within Core System Classes (/showthread.php?tid=48186)



Loading Models Within Core System Classes - El Forum - 01-07-2012

[eluser]Unknown[/eluser]
Hello,

I believe I may have discovered a bug in 2.1.0

When I attempt to load a model from within application/MY_Controller.php - whether within the constructor or within the method, I get an error.

The Error (Loading From Constructor):

Fatal error: Call to a member function model() on a non-object in C:\wamp\www\ult\application\core\MY_Controller.php on line 8

The same code works in earlier versions.

Please let me know if this is a bug.

Thanks