Description

When Zend_Controller_Request_Simple is in use[1], and Zend_Db_Profiler_Firebug is enabled in any Zend_Db_Adapter[2], application, trying to log SQL queries via firebug, crashes in nasty way[3]. The reason is that method Zend_Wildfire_Channel_HttpHeaders::isReady() does not make sure if current request object is HTTP one (which is mandatory to log anything through firebug), and one of required methods is missing.

As a quick workaround I made some changes in Zend_Wildfire_Channel_HttpHeaders::isReady() method[4], but I believe there must be a much better way to achieve it. The bug exists (at least) in 1.10.2 and 1.10.8 - those are the versions I tried.

[1] In index.php or any other script starting application:
$front->setRequest(new Zend_Controller_Request_Simple(...))

[2] For example in Bootstrap:
$profiler = new Zend_Db_Profiler_Firebug;
$profiler->setEnabled(true);

$db->setProfiler($profiler);

[3] The result is:
Fatal error: Call to undefined method Zend_Controller_Request_Simple::getHeader() in (...)/Zend/Wildfire/Channel/HttpHeaders.php on line 276

Christoph: ZF is supposed to run under E_STRICT, which means any method raising an E_DEPRECATED needs to be fixed. Please use "instanceof" in this case -- it takes into account inheritance, and is the proper mechanism.