$debug) { $backtrace .= "#$i " . (isset($debug['class']) ? $debug['class'] : '') . (isset($debug['type']) ? $debug['type'] : '') . (isset($debug['function']) ? $debug['function'] : '') . '(...) called at [' . (isset($debug['file']) ? $debug['file'] : '') . ':' . (isset($debug['line']) ? $debug['line'] : '') . ']' . "\n"; } } } else { ob_start(); @debug_print_backtrace(); $backtrace = ob_get_contents(); ob_end_clean(); } try { \Zend_Registry::get('logger_error')->logEvent($errno, $errstr, $errfile, $errline, $backtrace); } catch (Exception $e) { // in case the error occurs before the logger creation, we simply display it print("
$errstr \nin '$errfile' at the line $errline\n\n$backtrace\n
"); exit; } switch ($errno) { case E_ERROR: case E_PARSE: case E_CORE_ERROR: case E_CORE_WARNING: case E_COMPILE_ERROR: case E_COMPILE_WARNING: case E_USER_ERROR: exit; break; case E_WARNING: case E_NOTICE: case E_USER_WARNING: case E_USER_NOTICE: case E_STRICT: case E_RECOVERABLE_ERROR: case E_DEPRECATED: case E_USER_DEPRECATED: default: // do not exit break; } }