From 92561d7f36508b7e0271926e417adf0e2e53916b Mon Sep 17 00:00:00 2001 From: Appleman1234 Date: Sun, 25 Sep 2022 13:22:40 +1000 Subject: Initial attempt a switch to composer and PHP-8.1 compatibility --- inc/error.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'inc/error.php') diff --git a/inc/error.php b/inc/error.php index 1f66b977..37defe32 100644 --- a/inc/error.php +++ b/inc/error.php @@ -1,6 +1,6 @@ getMessage()); + error($e->getMessage() . " " . $e->getTraceAsString()); } -set_exception_handler('exception_handler'); +//set_error_handler('error_handler'); +//set_exception_handler('exception_handler'); function fatal_error_handler(){ if (($error = error_get_last()) && $error['type'] == E_ERROR) { @@ -24,7 +25,7 @@ register_shutdown_function('fatal_error_handler'); $error_recursion=false; -function error($message, $priority = true, $debug_stuff = false) { +function error($message, $priority = true, $debug_stuff = true) { global $board, $mod, $config, $db_error, $error_recursion; if($error_recursion!==false){ @@ -54,7 +55,7 @@ function error($message, $priority = true, $debug_stuff = false) { } $debug_stuff['backtrace'] = debug_backtrace(); $pw = $config['db']['password']; - $debug_callback = function(&$item) use (&$debug_callback, $pw) { + $debug_callback = function(&$item) use ($debug_callback, $pw) { if (is_array($item)) { return array_map($debug_callback, $item); } -- cgit v1.3