[eluser]Xerix[/eluser]
Hello All, I have a peculiar problem.
I get 'Fatal error: Call to a member function model() on a non-object in C:\Programming\www_root\passport\models\pages_model.php on line 15'
My directory structure for my 2 projects is
+www_root
----+passport (my app that doesnt work!)
----+cmt (my app that does work!)
----+system (Codeigniter 2.0.2)
code that generates error
Code:
class Pages_model extends CI_Model{
function __construct(){
parent::__construct();
$this->load->model('Menus_model'); //LINE 15
}
I thought you fixed this problem from CI 1.7.2?
Any Ideas? I upgraded to get around the problem of loading Models within Models. Is there something I need to change in my config somewhere. Also I am extending and constructing my classes properly using CI_Controller, CI_Model and using parent::__construct within the __construct function.
I have been pulling my hair out for 2 days now. Any help is much appreciated before I abandon CI 2.
Thanks