foreach($trace as $trn => $tr) {
if ($trn <= $skip) continue;
if ($html) $str .= '<tr><td>';
- $str .= $tr['file'].':'.$tr['line'].': ';
+ if (isset($tr['file']) && isset($tr['line']))
+ $str .= $tr['file'].':'.$tr['line'].': ';
if ($html) $str .= '</td><td>';
if (isset($tr['type'])) {
if($tr['type'] == '::') {
}
$str .= $tr['function'].'(';
- if(is_array($tr['args'])) {
+ if(isset($tr['args']) && is_array($tr['args'])) {
$args = array();
foreach($tr['args'] as $n=>$a) {
if (is_object($tr['args'][$n]))
return true;
}
+
+function exception_handler($exception)
+{
+ error_handler(E_ERROR, sprintf(_("Unhandled exception [%s]: %s."), $exception->getCode(), $exception->getMessage()),
+ $exception->getFile(), $exception->getLine());
+ end_page();
+}
//------------------------------------------------------------------------------
// Formats system messages before insert them into message <div>
// FIX center is unused now