Code

Updated logging
[gosa.git] / include / php_setup.inc
index e83379c9826cdd039a758e2d177d6658e75e8a22..ec13459435faafcdfcb6492c3f538883d69db13b 100644 (file)
@@ -22,6 +22,10 @@ function gosaRaiseError($errno, $errstr, $errfile, $errline)
 {
   global $error_collector,$config;
 
+  if(@class_exists("log")){
+    new log("debug","all",$errfile,array(),"Type:".$errno.", Message:".$errstr.", File:".$errfile.", Line: ".$errline);
+  }
+
   /* Return if error reporting is set to zero */
   if (error_reporting() == 0){
     return;
@@ -57,7 +61,7 @@ function gosaRaiseError($errno, $errstr, $errfile, $errline)
     if((isset($config->data['MAIN']['DISPLAYERRORS']))&&(!preg_match("/^true$/i",$config->data['MAIN']['DISPLAYERRORS']))){
 
       /* Write to syslog */
-      gosa_log ("PHP error: $errstr ($errfile, line $errline)");
+      new log("view","error","",array(),"PHP error: $errstr ($errfile, line $errline)");
       return;
     }
   }