diff options
Diffstat (limited to 'inc/functions.php')
| -rw-r--r-- | inc/functions.php | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/inc/functions.php b/inc/functions.php index b6bdd809..6c903663 100644 --- a/inc/functions.php +++ b/inc/functions.php @@ -155,19 +155,9 @@ function loadConfig() { } if ($config['verbose_errors']) { - set_error_handler(function($errno, $errstr, $errfile, $errline) { - if (error_reporting() == 0) - return false; // Looks like this warning was suppressed by the @ operator. - error(utf8tohtml($errstr), true, array( - 'file' => $errfile, - 'line' => $errline, - 'errno' => $errno, - 'error' => $errstr, - 'backtrace' => array_slice(debug_backtrace(), 1) - )); - }); + set_error_handler('verbose_error_handler'); error_reporting(E_ALL); - ini_set('display_errors', true); + ini_set('display_errors', false); ini_set('html_errors', false); } @@ -244,6 +234,17 @@ function _syslog($priority, $message) { } } +function verbose_error_handler($errno, $errstr, $errfile, $errline) { + if (error_reporting() == 0) + return false; // Looks like this warning was suppressed by the @ operator. + error(utf8tohtml($errstr), true, array( + 'file' => $errfile . ':' . $errline, + 'errno' => $errno, + 'error' => $errstr, + 'backtrace' => array_slice(debug_backtrace(), 1) + )); +} + function create_antibot($board, $thread = null) { require_once dirname(__FILE__) . '/anti-bot.php'; |
