From d890ec0d9a4a5022289f19107e840be0a658d7b7 Mon Sep 17 00:00:00 2001 From: Urban Müller Date: Mon, 10 Dec 2007 13:29:24 +0000 Subject: prevent headers already sent --- auto_prepend.php | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'auto_prepend.php') diff --git a/auto_prepend.php b/auto_prepend.php index 6109726..7a66c36 100644 --- a/auto_prepend.php +++ b/auto_prepend.php @@ -66,7 +66,11 @@ function EDC() $GLOBALS['ULTRADEBUGVARS'][$var] = 1; if (($result = $GLOBALS["debug_$var"]) && $args) + { + if (ob_get_level() == 0) + ob_start(); # prevent later 'headers already sent' error echo it_debug::dump($args); + } if (!$result || $result === true) # Compatibility with old map relying on 0|1 $result = intval($result); -- cgit v1.2.3