Prevent filling debug parameter when debug is turned off in config
The debug parameter can lead to memory exhaustion errors for some errors, this prevents it happening when debug output is disabled
This commit is contained in:
parent
7ba421ff24
commit
e307afd09f
|
@ -125,7 +125,7 @@ function error($message, $priority = true, $debug_stuff = false) {
|
|||
'message' => $message,
|
||||
'mod' => $mod,
|
||||
'board' => isset($board) ? $board : false,
|
||||
'debug' => is_array($debug_stuff) ? str_replace("\n", ' ', utf8tohtml(print_r($debug_stuff, true))) : utf8tohtml($debug_stuff)
|
||||
'debug' => $config['debug'] ? (is_array($debug_stuff) ? str_replace("\n", ' ', utf8tohtml(print_r($debug_stuff, true))) : utf8tohtml($debug_stuff)) : null
|
||||
))
|
||||
)));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user