[eluser]regal2157[/eluser]
Hey everyone,
I have a controller, and in the constructor, I call a library. I then try to use a method inside it, but I get thrown the error:
Quote:Fatal error: Call to undefined method stdClass::createLog() in /usr/apps/webdata/sandbox/application/controllers/admin.php on line 11
Here is my controller (part that calls the library, in the construct):
Code:
$this->load->library('Regal_log');
$this->Regal_log->log_file = 'login';
print_r(get_class_methods('Regal_log'));
//die();
$this->Regal_log->createLog(); //LINE 11
$this->Regal_log->Log('Login page loaded',1);
PHP does see the class methods, as the print_r returns:
Quote:Array ( [0] => __construct [1] => index [2] => createLog [3] => Log )
Any ideas?
I am totally lost on this one. :/ I can run the class outside of CI with not a problem..