Fatal error: Call to a member function item() on a non-object
- by Andree
Hi there!
I have a weird problem. I have a PHP class with the following method:
public function __construct()
{
parent::__construct();
$this->CI =& get_instance();
$this->log(method_exists($this->CI->config, 'item')); // Outputs TRUE
$firephp_enabled = $this->CI->config->item('firephp_enabled'); // Error point
$this->setEnabled($firephp_enabled);
}
$this->CI->config has a method item, and it has been verified using method_exists(). But when I call $this->CI->config->item(), I got the following error:
Fatal error: Call to a member function item() on a non-object
Can anyone tell me what might be the problem here?
Thanks, Andree.