From 2d4c33a799ca7017d5cc52f663a7f7d0041e95ee Mon Sep 17 00:00:00 2001 From: hickert Date: Fri, 24 Aug 2007 13:17:14 +0000 Subject: [PATCH] Updated error handling git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@7138 594d385d-05f5-0310-b6e9-bd551577e9d8 --- include/php_setup.inc | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/include/php_setup.inc b/include/php_setup.inc index 95fb9a53e..324a6b740 100644 --- a/include/php_setup.inc +++ b/include/php_setup.inc @@ -26,6 +26,10 @@ function gosaRaiseError($errno, $errstr, $errfile, $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; @@ -71,7 +75,8 @@ function gosaRaiseError($errno, $errstr, $errfile, $errline) 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". @@ -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"); - + } + if (isset($_SESSION['js']) && $_SESSION['js']==FALSE){ $error_collector= "
"; } else { -- 2.30.2