[eluser]Muncken[/eluser]
I have searched around and found similar threads, but none that could solve my problem. Suddenly, like out of nowhere, I started getting the error
Call to a member function ... on a non-object. As far as I am concerned I have changed nothing, but something must have gone wrong.
The error shows whenever I am trying to call a Model function from within a Controller. I load the model the appropriate place with the
Code:
$this->load->model('myModel')
feature and I get no errors whatsoever. But when trying to use the model function, like this:
Code:
$data = $this->myModel->getData();
... I get the error from above. The strange thing is that if I call the model function directly, using:
Code:
$data = myModel::getData()
... Then it works. I have not touched the code above, so the error must be somewhere else in my project.
I am ripping my hair off of frustration. Any help is appreciated.
Thanks.
Kasper