[ticket/9079] Display backtrace on all E_USER_ERROR errors, not only SQL errors

PHPBB3-9079
This commit is contained in:
Andreas Fischer 2011-07-26 17:48:17 +02:00 committed by Oleg Pudeyev
parent 519db8e3b2
commit d9fef488af
2 changed files with 7 additions and 5 deletions

View file

@ -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
{

View file

@ -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