diff options
| author | Appleman1234 <applemansigloo@gmail.com> | 2022-09-25 13:22:40 +1000 |
|---|---|---|
| committer | Appleman1234 <applemansigloo@gmail.com> | 2022-09-25 13:22:40 +1000 |
| commit | 92561d7f36508b7e0271926e417adf0e2e53916b (patch) | |
| tree | a8588b4f70af276c5acf58836e33b1f6ff5c61e8 /inc/error.php | |
| parent | 6f1083e4b51fc9c4c594f6c72cf3d84ef4d0298b (diff) | |
Initial attempt a switch to composer and PHP-8.1 compatibility
Diffstat (limited to 'inc/error.php')
| -rw-r--r-- | inc/error.php | 11 |
1 files changed, 6 insertions, 5 deletions
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 @@ <?PHP -function error_handler($errno,$errstr,$errfile, $errline, $errcontext){ +function error_handler($errno,$errstr,$errfile, $errline){ if(error_reporting() & $errno){ $config['debug']=true; error($errstr . ' in ' . $errfile . ' at line ' . $errline); @@ -9,10 +9,11 @@ function error_handler($errno,$errstr,$errfile, $errline, $errcontext){ } function exception_handler($e){ - error($e->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); } |
