diff --git a/inc/infoutils.php b/inc/infoutils.php
index 56526ac54857c52814f179d82ccda0eb9d611b69..f0a191bbe64f0a77ab971068d2236ccb21d149c9 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){