[eluser]Hartimer[/eluser]
Hi
I'm trying to work with hooks but i'm getting a really anoying error
Code:
Fatal error: Call to a member function helper() on a non-object in /<whatever>/system/application/hooks/my_hook.php on line 6
The hook looks like this:
Code:
<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
class My_hook {
public function __construct(){
$this->obj =& get_instance();
$this->obj->load->helper('url'); // this is line 6
}
}
I've seen tones of demos where get_instance works like a charm, including on hooks... have no idea why i'm getting this, but i believe it is a really silly mistake..