Search code examples
firebugkohanafirephp

Getting FirePHP working in Kohana 3.1


I think I've successfully installed the FirePHP module in Kohana 3.1 but I'm not getting any output to the FireBug console.

I've tried this:

FirePHP::log('test');

and got this error:

Non-static method FirePHP::log() should not be called statically, assuming $this from incompatible context.

When I turn off the module and run FirePHP manually:

require_once('FirePHPCore/fb.php');
fb('test');

Nothing shows up in the console.


Solution

  • As the exception message says, you shouldn't call that method statically, but like :

    FirePHP::getInstance()->log('test');
    

    Few days ago static Fire helper class was added, so now you can do:

    Fire::log('test');
    

    https://github.com/kemo/kohana-firephp

    Another possible problem can be Firebug 1.8 because the current FirePHP add-on version doesn't work with it. You can update your add-on here