summaryrefslogtreecommitdiff
path: root/framework/Util/TLogRouter.php
diff options
context:
space:
mode:
Diffstat (limited to 'framework/Util/TLogRouter.php')
-rw-r--r--framework/Util/TLogRouter.php12
1 files changed, 12 insertions, 0 deletions
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));