From 82d030f3e020266f914799b034d9fbe2dd3f577f Mon Sep 17 00:00:00 2001 From: Urban Müller Date: Mon, 10 Dec 2007 13:45:34 +0000 Subject: prevent headers already sent --- auto_prepend.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/auto_prepend.php b/auto_prepend.php index 7a66c36..8955371 100644 --- a/auto_prepend.php +++ b/auto_prepend.php @@ -51,6 +51,8 @@ function D() function ED() { $args = func_get_args(); + if (ob_get_level() == 0 && $_SERVER['REMOTE_ADDR']) + ob_start(); # prevent later 'headers already sent' error echo it_debug::dump($args); return $args[0]; } @@ -67,7 +69,7 @@ function EDC() if (($result = $GLOBALS["debug_$var"]) && $args) { - if (ob_get_level() == 0) + if (ob_get_level() == 0 && $_SERVER['REMOTE_ADDR']) ob_start(); # prevent later 'headers already sent' error echo it_debug::dump($args); } -- cgit v1.2.3