CodeIgniter Error Filename: Controller.php Line Number: 58

Be carreful to lowercase and uppercase names when loading modules or controllers. CodeIgniter seems to be case sensible.

this famous error is :

A PHP Error was encountered
Severity: Notice
Message: Undefined property: CI::$News_model
Filename: MX/Controller.php
Line Number: 58
( ! ) Fatal error: Call to a member function count() on a non-object in C:\wamp\www\ci\hmvc214d\application\modules\news\controllers\news.php on line 31

codeigniter-error-58

MY ERROR : My Controller was loading news_model in calss constructor and I was trying to call a function this->News_model->search_handler  :

codeigniter-error-58-2

THE SOLUTION WAS TO USE ALL IN LOWERCASE like models and controllers filenames  and not the name of class Model which start with News_Model extends CI_Model.

Cheers

extradrmtech

Since 30 years I work on Database Architecture and data migration protocols. I am also a consultant in Web content management solutions and medias protecting solutions. I am experienced web-developer with over 10 years developing PHP/MySQL, C#, VB.Net applications ranging from simple web sites to extensive web-based business applications. Besides my work, I like to work freelance only on some wordpress projects because it is relaxing and delightful CMS for me. When not working, I like to dance salsa and swing and to have fun with my little family.

You may also like...