Call to a member function ... on a non-object |
[eluser]BigBonsai[/eluser]
Hello, I have been struggling to get my bearings on CI now for a few days. Things have gone fairly well. I have overcome the dust on the user guide (some outdated stuff in there) and now I am thoroughly stuck. After reading this forum for two hours I still cannot get anywhere, although this problem has been discussed before. I guess my understanding of OOP is not good enough. Well, let's see. This is my error message: Code: Fatal error: Call to a member function login() on a non-object in [...]\application\controllers\pages.php on line 46 Ok. So here is "pages.php": Code: <?php The problem is this line: Code: $this->login_model->login(); Code: <?php As you can see (for whoever knows it), the login function is copied from the Simplelogin library, but ultimately I suspect it doesn't matter what it says in there, since it is not accessed in the first place. The database connection is not included, because I have this line in the autoconfig.php: Code: $autoload['libraries'] = array('database', 'session'); In my humble understanding, this should take care of the database connection. What am I overlooking/messing up for getting the above mentioned error? Thanks a bundle in advance! ![]() BiB |
Messages In This Thread |
Call to a member function ... on a non-object - by El Forum - 04-14-2012, 07:33 AM
Call to a member function ... on a non-object - by El Forum - 04-14-2012, 08:14 AM
Call to a member function ... on a non-object - by El Forum - 04-14-2012, 08:20 AM
Call to a member function ... on a non-object - by El Forum - 04-14-2012, 08:32 AM
Call to a member function ... on a non-object - by El Forum - 10-06-2012, 03:30 AM
Call to a member function ... on a non-object - by El Forum - 10-06-2012, 04:14 AM
Call to a member function ... on a non-object - by El Forum - 10-06-2012, 06:03 AM
Call to a member function ... on a non-object - by El Forum - 10-06-2012, 08:23 AM
Call to a member function ... on a non-object - by El Forum - 03-12-2014, 01:38 PM
|