diff --git a/include/php_setup.inc b/include/php_setup.inc
index 03727fce5982c85356ac3dcf53927404382bcd16..ec13459435faafcdfcb6492c3f538883d69db13b 100644 (file)
--- a/include/php_setup.inc
+++ b/include/php_setup.inc
{
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;
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;
}
}
if (isset($_SESSION['js']) && $_SESSION['js']==FALSE){
$error_collector= "<div>";
} else {
- $error_collector= "<table summary=\"\" width=\"100%\" style='background-color:#E0E0E0;border-bottom:1px solid black';z-index:150;><tr><td><img alt=\"\" align=\"middle\" src='".get_template_path('images/warning.png')."'> <font style='font-size:14px;font-weight:bold'>"._("Generating this page caused the PHP interpreter to raise some errors!")."</font></td><td align=right><button onClick='toggle(\"errorbox\")'>"._("Toggle information")."</button></td></tr></table><div id='errorbox' style='position:absolute; z-index:150; visibility: hidden'>";
+ $error_collector= "<table summary=\"\" width=\"100%\" style='background-color:#E0E0E0;border-bottom:1px solid black;z-index:150;'><tr><td><img alt=\"\" align=\"middle\" src='".get_template_path('images/warning.png')."'> <font style='font-size:14px;font-weight:bold'>"._("Generating this page caused the PHP interpreter to raise some errors!")."</font></td><td align=right><button onClick='toggle(\"errorbox\")'>"._("Toggle information")."</button></td></tr></table><div id='errorbox' style='position:absolute; z-index:150; visibility: hidden'>";
}
}
$args= "";
if (isset($ct['args'])){
foreach ($ct['args'] as $arg){
+
+ /* Avoid convertig object to string errors */
+ if(is_object($arg)){
+ $arg = "CLASS: ".get_class($arg);
+ }
+
$args.= htmlentities("\"$arg\", ");
}
}