'error', E_WARNING => 'warning', E_PARSE => 'parsing error', E_NOTICE => 'notice', E_CORE_ERROR => 'core error', E_CORE_WARNING => 'core warning', E_COMPILE_ERROR => 'compile error', E_COMPILE_WARNING => 'compile warning', E_USER_ERROR => 'user error', E_USER_WARNING => 'user warning', E_USER_NOTICE => 'user notice' ); if(defined('E_STRICT')) $fs_errortypes[E_STRICT] = 'runtime notice'; $GLOBALS['fs_errortypes'] = $fs_error_types; /* $GLOBALS['fs_last_error_id'] = 0; function fs_on_error($errno, $errstr, $errfile, $errline) // resume next! { global $fs_error_types; $err_id = $GLOBALS['fs_last_error_id']; $GLOBALS['fs_last_error_id']++; $ts = date("H:m:s"); $type = $fs_error_types[$errno]; if ($err_id == 0) // first error {?>
';
$traceArr = debug_backtrace();
array_shift($traceArr);
array_shift($traceArr);
$tabs = sizeof($traceArr)-1;
foreach ($traceArr as $arr) {
//for ($i=0; $i < $tabs; $i++) $s .= ' ';
$s .=" ";
$tabs -= 1;
$s .= '';
if (isset($arr['class'])) $s .= $arr['class'].'.';
/*
foreach($arr['args'] as $v) {
if (is_null($v)) $args[] = 'null';
else if (is_array($v)) $args[] = 'Array['.sizeof($v).']';
else if (is_object($v)) $args[] = 'Object:'.get_class($v);
else if (is_bool($v)) $args[] = $v ? 'true' : 'false';
else {
$v = (string) @$v;
$str = htmlspecialchars(substr($v,0,$MAXSTRLEN));
if (strlen($v) > $MAXSTRLEN) $str .= '...';
$args[] = $str;
}
}
*/
$line = isset($arr['line']) ? $arr['line'] : '?';
$file = isset($arr['file']) ? $arr['file'] : '';
$args = array();
$s .= $arr['function'].'('.implode(', ',$args).')';
if (!empty($file))
{
$s .= sprintf(" # line %4d,".
" file: %s",
$line,$file,$file);
}
else
{
$s .=sprintf(" # line %4d,".
" unknown file",
$line);
}
$s .= "\n";
}
$s .= '';
}
return $s;
}
?>