Code

Fixed error handling, when display_errors is set to flase
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 27 Nov 2007 08:50:42 +0000 (08:50 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 27 Nov 2007 08:50:42 +0000 (08:50 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@7903 594d385d-05f5-0310-b6e9-bd551577e9d8

include/class_location.inc
include/php_setup.inc

index f712da759784f8cc575d8924c0ef6b5e5683c65c..438c7fcb6c1cf9015c7639ac6a45b04719a5c8d9 100644 (file)
@@ -26,6 +26,7 @@ $class_mapping= array(
                 "connectivity" => "plugins/personal/connectivity/class_connectivity.inc",
                 "blocklist" => "plugins/gofax/blocklists/class_blocklistManagement.inc",
                 "divListBlocklist" => "plugins/gofax/blocklists/class_divListBlocklists.inc",
+                "blocklistGeneric" => "plugins/gofax/blocklists/class_blocklistGeneric.inc",
                 "gofaxAccount" => "plugins/gofax/faxaccount/class_gofaxAccount.inc",
                 "faxreport" => "plugins/gofax/faxreports/class_faxreport.inc",
                 "addressbook" => "plugins/addons/addressbook/class_addressbook.inc",
index 3a047fd64417e367a643993bf0a299e02a19e853..2901f8d2a6675e6a9109bcd967bc43111b21ddc3 100644 (file)
@@ -49,7 +49,7 @@ function gosaRaiseError($errno, $errstr, $errfile, $errline)
 
       
       /* Write to syslog */
-      if(!preg_match("/No such object/",$message)){
+      if(class_exists("log") && !preg_match("/No such object/",$errstr)){
         new log("view","error","",array(),"PHP error: $errstr ($errfile, line $errline)");
       }
       return;
@@ -57,12 +57,10 @@ function gosaRaiseError($errno, $errstr, $errfile, $errline)
   }
   
   /* Send all errors to logging class, except "Ldap : No such object" messages*/
-  if(@class_exists("log") && !preg_match("/No such object/",$errstr)){
+  if(class_exists("log") && !preg_match("/No such object/",$errstr)){
     new log("debug","all",$errfile,array(),"Type:".$errno.", Message:".$errstr.", File:".$errfile.", Line: ".$errline);
   }
 
-
   /* Create header as needed */
   if ($error_collector == ""){