summaryrefslogtreecommitdiff
path: root/inc/infoutils.php
diff options
context:
space:
mode:
authorMichael Hamann <michael@content-space.de>2010-09-18 17:31:45 +0200
committerMichael Hamann <michael@content-space.de>2010-09-18 17:31:45 +0200
commit5bd930fff2b3cc98f360d3689dd4e00e0b5f92c4 (patch)
tree9ad11c03e80283114b631195eee1e7ce9b45eef8 /inc/infoutils.php
parent3cf900244031048d73d8dc9cc4ae32a9362dca59 (diff)
downloadrpg-5bd930fff2b3cc98f360d3689dd4e00e0b5f92c4.tar.gz
rpg-5bd930fff2b3cc98f360d3689dd4e00e0b5f92c4.tar.bz2
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.
Diffstat (limited to 'inc/infoutils.php')
-rw-r--r--inc/infoutils.php3
1 files changed, 3 insertions, 0 deletions
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);
}