diff --git a/inc/error.php b/inc/error.php index c0f59dac..5974be77 100644 --- a/inc/error.php +++ b/inc/error.php @@ -28,22 +28,22 @@ $error_recursion=false; function error($message, $priority = true, $debug_stuff = false) { global $board, $mod, $config, $db_error, $error_recursion; - + if($error_recursion!==false){ die("Error recursion detected with " . $message . "
Original error:".$error_recursion); } - + $error_recursion=$message; - + if (defined('STDIN')) { // Running from CLI echo('Error: ' . $message . "\n"); debug_print_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS); die(); } - + if(!empty($config)){ - + if ($config['syslog'] && $priority !== false) { // Use LOG_NOTICE instead of LOG_ERR or LOG_WARNING because most error message are not significant. _syslog($priority !== true ? $priority : LOG_NOTICE, $message); @@ -77,7 +77,7 @@ function error($message, $priority = true, $debug_stuff = false) { } header($_SERVER['SERVER_PROTOCOL'] . ' 500 Internal Server Error'); - + die(Element('page.html', array( 'config' => $config, 'title' => _('Error'),