CodeIgniter Forums

Full Version: Loading Models Within Core System Classes
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum

[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