03-20-2011, 10:36 PM
[eluser]leozzz[/eluser]
[quote author="puppycrack" date="1231744783"]I believe it means that $this->MOrders is null, hence you are trying to call a function on a non-object. It's probably not loading correctly. Can you list two things?
1) The line that loads the model in the controller
2) The name of the file that contains the model
I have run into this before when the filename containing the model started with an upper case character.
-pc[/quote]
I found the error, you have to add the new model to autoload.php
where the book forgot to mention this point.
[quote author="puppycrack" date="1231744783"]I believe it means that $this->MOrders is null, hence you are trying to call a function on a non-object. It's probably not loading correctly. Can you list two things?
1) The line that loads the model in the controller
2) The name of the file that contains the model
I have run into this before when the filename containing the model started with an upper case character.
-pc[/quote]
I found the error, you have to add the new model to autoload.php
where the book forgot to mention this point.