From 5bd930fff2b3cc98f360d3689dd4e00e0b5f92c4 Mon Sep 17 00:00:00 2001 From: Michael Hamann <michael@content-space.de> Date: Sat, 18 Sep 2010 17:31:45 +0200 Subject: [PATCH] Write the debug log only when debugging is enabled The debug log isn't automatically cleaned so don't write to it when debugging is disabled and thus nobody is aware that debug output might be generated. --- inc/infoutils.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/inc/infoutils.php b/inc/infoutils.php index ac6a0a84c..d3c6f2918 100644 --- a/inc/infoutils.php +++ b/inc/infoutils.php @@ -304,6 +304,9 @@ function dbg($msg,$hidden=false){ */ function dbglog($msg,$header=''){ global $conf; + // The debug log isn't automatically cleaned thus only write it when + // debugging has been enabled by the user. + if($conf['allowdebug'] !== 1) return; if(is_object($msg) || is_array($msg)){ $msg = print_r($msg,true); } -- GitLab