diff options
author | Oleg Pudeyev <oleg@bsdpower.com> | 2011-12-24 01:24:09 -0500 |
---|---|---|
committer | Oleg Pudeyev <oleg@bsdpower.com> | 2011-12-24 01:24:09 -0500 |
commit | b6999237f456443b0b325f2ebee1f990ee7f5116 (patch) | |
tree | 066a63ac569a1349cde242504a2f739c1f308ced /phpBB/includes | |
parent | d9fef488af150107b753b3c30e15ab5bf6d9da38 (diff) | |
download | forums-b6999237f456443b0b325f2ebee1f990ee7f5116.tar forums-b6999237f456443b0b325f2ebee1f990ee7f5116.tar.gz forums-b6999237f456443b0b325f2ebee1f990ee7f5116.tar.bz2 forums-b6999237f456443b0b325f2ebee1f990ee7f5116.tar.xz forums-b6999237f456443b0b325f2ebee1f990ee7f5116.zip |
[ticket/9079] Always log backtrace to error log when logging errors.
PHPBB3-9079
Diffstat (limited to 'phpBB/includes')
-rw-r--r-- | phpBB/includes/functions.php | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index f625f70c0f..1eefaee651 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -3853,18 +3853,23 @@ function msg_handler($errno, $msg_text, $errfile, $errline) } } + $log_text = $msg_text; + $backtrace = get_backtrace(); + if ($backtrace) + { + $log_text .= '<br /><br />BACKTRACE<br />' . $backtrace; + } + 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 />'; + $msg_text = $log_text; } if ((defined('DEBUG') || defined('IN_CRON') || defined('IMAGE_OUTPUT')) && isset($db)) { // let's avoid loops $db->sql_return_on_error(true); - add_log('critical', 'LOG_GENERAL_ERROR', $msg_title, $msg_text); + add_log('critical', 'LOG_GENERAL_ERROR', $msg_title, $log_text); $db->sql_return_on_error(false); } |