diff options
author | godzilla80@gmx.net <> | 2009-06-07 08:51:24 +0000 |
---|---|---|
committer | godzilla80@gmx.net <> | 2009-06-07 08:51:24 +0000 |
commit | 72f37d54a27a3011cea4d52a78d87b472530fda3 (patch) | |
tree | 72396a1bc0f796ed178c2b0db5cb988887885618 | |
parent | cb8f2362ca522fc04b71eaf4d61cb30ad0e73ddf (diff) |
Enhancement: TFirePhpLogRoute: bypass to TBrowserLogRoute if headers already sent / php.ini (output_buffering=Off, implicit_flush=On)
-rw-r--r-- | HISTORY | 1 | ||||
-rw-r--r-- | framework/Util/TLogRouter.php | 12 |
2 files changed, 13 insertions, 0 deletions
@@ -5,6 +5,7 @@ BUG: Issue#164 - CultureInfo::validCulture should be declared as a static method BUG: Issue#168 - TSqlMapXmlConfiguration: CacheModel properties are not set (Yves) ENH: Issue#175 - TBulletedList: Introduce TBulletStyle::None (Yves) ENH: TAssetManager: introduce protected property "Published" to allow subclasses access (Yves) +ENH: TFirePhpLogRoute: bypass to TBrowserLogRoute if headers already sent / php.ini (output_buffering=Off, implicit_flush=On) (Yves) Version 3.1.5 May 24, 2009 BUG: Issue#55 - TPropertyAccess.get and has don't recognize magic getter __get (Yves) 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 '
+ <div style="width:100%; background-color:darkred; color:#FFF; padding:2px">
+ TFirePhpLogRoute.GroupLabel "<i>' . $this -> getGroupLabel() . '</i>" -
+ Routing to FirePHP impossible, because headers already sent!
+ </div>
+ ';
+ $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));
|