From c7408a6326fe814aaf38f4b58fbe4ed55c025339 Mon Sep 17 00:00:00 2001 From: Andreas Gohr <andi@splitbrain.org> Date: Tue, 13 Jan 2009 13:26:38 +0100 Subject: [PATCH] better logging for objects and arrays in dbglog() darcs-hash:20090113122638-7ad00-6bc9dc3dd4120b5a1551b50d97ce8529619819ce.gz --- inc/infoutils.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/inc/infoutils.php b/inc/infoutils.php index 56526ac54..f0a191bbe 100644 --- a/inc/infoutils.php +++ b/inc/infoutils.php @@ -262,6 +262,10 @@ function dbg($msg,$hidden=false){ */ function dbglog($msg){ global $conf; + if(is_object($msg) || is_array($msg)){ + $msg = print_r($msg,true); + } + $file = $conf['cachedir'].'/debug.log'; $fh = fopen($file,'a'); if($fh){ -- GitLab