Code

Updated error handling
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 24 Aug 2007 13:17:14 +0000 (13:17 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 24 Aug 2007 13:17:14 +0000 (13:17 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@7138 594d385d-05f5-0310-b6e9-bd551577e9d8

include/php_setup.inc

index 95fb9a53ef578065893e268a6e9aa0709b1b6459..324a6b740d31587455e3d2d3f1acf663cb16a213 100644 (file)
@@ -26,6 +26,10 @@ function gosaRaiseError($errno, $errstr, $errfile, $errline)
     new log("debug","all",$errfile,array(),"Type:".$errno.", Message:".$errstr.", File:".$errfile.", Line: ".$errline);
   }
 
     new log("debug","all",$errfile,array(),"Type:".$errno.", Message:".$errstr.", File:".$errfile.", Line: ".$errline);
   }
 
+  if(function_exists("gosa_log")){
+    gosa_log($errno." ".$errstr." ".$errfile." ".$errline);
+  }
+
   /* Return if error reporting is set to zero */
   if (error_reporting() == 0){
     return;
   /* Return if error reporting is set to zero */
   if (error_reporting() == 0){
     return;
@@ -71,7 +75,8 @@ function gosaRaiseError($errno, $errstr, $errfile, $errline)
   if ($error_collector == ""){
 
     /* Mailto body header */
   if ($error_collector == ""){
 
     /* Mailto body header */
-    $error_collector_mailto .=prepare4mailbody(
+    if(function_exists("prepare4mailbody")){
+      $error_collector_mailto .=prepare4mailbody(
                                 "Oups. Seems like you've catched some kind of bug inside GOsa/PHP. You may want to help ".
                                 "us to improve the software stability. If so, please provide some more information below.".
                                 "\n\n".
                                 "Oups. Seems like you've catched some kind of bug inside GOsa/PHP. You may want to help ".
                                 "us to improve the software stability. If so, please provide some more information below.".
                                 "\n\n".
@@ -84,7 +89,8 @@ function gosaRaiseError($errno, $errstr, $errfile, $errline)
                                 "reproduce this bug using the demo on http://www.gosa-project.org ?".
                                 "\n\n".
                                 "*** PHP error information ***\n\n");
                                 "reproduce this bug using the demo on http://www.gosa-project.org ?".
                                 "\n\n".
                                 "*** PHP error information ***\n\n");
-
+      }
+    
     if (isset($_SESSION['js']) && $_SESSION['js']==FALSE){
       $error_collector= "<div>";
     } else {
     if (isset($_SESSION['js']) && $_SESSION['js']==FALSE){
       $error_collector= "<div>";
     } else {