Сannot use the same name controllers and library? |
controller Design.php
Code: class Design extends CI_Controller { ERROR Message: Undefined property: Design::$design Filename: controllers/Design.php if use Code: class Design extends CI_Controller { no errors This issue start after update from 2.2 to 3.0 How fix? We have big project(
06-03-2015, 01:21 PM
(This post was last modified: 06-03-2015, 01:22 PM by davicotico. Edit Reason: Fix )
Assign the Library to a different object name:
Code: $this->load->library('design', NULL, 'my_design');
It has nothing to do with the controller and library names. You're just overriding CI_Controller::__construct().
Either get rid of your __construct() since you aren't doing anything with it, or it needs to call the parents __construct(). As Narf said, you're overriding it.
http://www.codeigniter.com/user_guide/ge...nstructors
i paste this code only for example/
we use correct Code: function __construct() { the problem remains |
Welcome Guest, Not a member yet? Register Sign In |