mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
[ticket/9079] Display backtrace on all E_USER_ERROR errors, not only SQL errors
PHPBB3-9079
This commit is contained in:
parent
519db8e3b2
commit
d9fef488af
2 changed files with 7 additions and 5 deletions
|
@ -662,12 +662,7 @@ class dbal
|
|||
// The DEBUG_EXTRA constant is for development only!
|
||||
if ((isset($auth) && $auth->acl_get('a_')) || defined('IN_INSTALL') || defined('DEBUG_EXTRA'))
|
||||
{
|
||||
// Print out a nice backtrace...
|
||||
$backtrace = get_backtrace();
|
||||
|
||||
$message .= ($sql) ? '<br /><br />SQL<br /><br />' . htmlspecialchars($sql) : '';
|
||||
$message .= ($backtrace) ? '<br /><br />BACKTRACE<br />' . $backtrace : '';
|
||||
$message .= '<br />';
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -3853,6 +3853,13 @@ function msg_handler($errno, $msg_text, $errfile, $errline)
|
|||
}
|
||||
}
|
||||
|
||||
if (defined('IN_INSTALL') || defined('DEBUG_EXTRA') || isset($auth) && $auth->acl_get('a_'))
|
||||
{
|
||||
$backtrace = get_backtrace();
|
||||
$msg_text .= ($backtrace) ? '<br /><br />BACKTRACE<br />' . $backtrace : '';
|
||||
$msg_text .= '<br />';
|
||||
}
|
||||
|
||||
if ((defined('DEBUG') || defined('IN_CRON') || defined('IMAGE_OUTPUT')) && isset($db))
|
||||
{
|
||||
// let's avoid loops
|
||||
|
|
Loading…
Add table
Reference in a new issue