From 72f37d54a27a3011cea4d52a78d87b472530fda3 Mon Sep 17 00:00:00 2001 From: "godzilla80@gmx.net" <> Date: Sun, 7 Jun 2009 08:51:24 +0000 Subject: Enhancement: TFirePhpLogRoute: bypass to TBrowserLogRoute if headers already sent / php.ini (output_buffering=Off, implicit_flush=On) --- framework/Util/TLogRouter.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'framework/Util') diff --git a/framework/Util/TLogRouter.php b/framework/Util/TLogRouter.php index b7b2f0a3..64a241fb 100644 --- a/framework/Util/TLogRouter.php +++ b/framework/Util/TLogRouter.php @@ -1015,6 +1015,18 @@ class TFirePhpLogRoute extends TLogRoute { if(empty($logs) || $this->getApplication()->getMode()==='Performance') return; + if( headers_sent() ) { + echo ' +
+ TFirePhpLogRoute.GroupLabel "' . $this -> getGroupLabel() . '" - + Routing to FirePHP impossible, because headers already sent! +
+ '; + $fallback = new TBrowserLogRoute(); + $fallback->processLogs($logs); + return; + } + require_once Prado::getPathOfNamespace('System.3rdParty.FirePHPCore') . '/FirePHP.class.php'; $firephp = FirePHP::getInstance(true); $firephp -> setOptions(array('useNativeJsonEncode' => false)); -- cgit v1.2.3