From 91db029a18ddebaba09292ae4e2ffcd011974d9e Mon Sep 17 00:00:00 2001 From: hickert Date: Tue, 27 Nov 2007 08:50:42 +0000 Subject: [PATCH] Fixed error handling, when display_errors is set to flase git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@7903 594d385d-05f5-0310-b6e9-bd551577e9d8 --- include/class_location.inc | 1 + include/php_setup.inc | 6 ++---- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/include/class_location.inc b/include/class_location.inc index f712da759..438c7fcb6 100644 --- a/include/class_location.inc +++ b/include/class_location.inc @@ -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", diff --git a/include/php_setup.inc b/include/php_setup.inc index 3a047fd64..2901f8d2a 100644 --- a/include/php_setup.inc +++ b/include/php_setup.inc @@ -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 == ""){ -- 2.30.2