aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions.php
diff options
context:
space:
mode:
authorOleg Pudeyev <oleg@bsdpower.com>2012-01-12 22:30:23 -0500
committerOleg Pudeyev <oleg@bsdpower.com>2012-01-12 22:30:23 -0500
commitc3aa466523e9b074bc4479eccc7b0514972f4b28 (patch)
treea73ef6d6d67c95a27e88314f054547ce61e58d5c /phpBB/includes/functions.php
parent466acfdd943e37a3e1d98b12143894274fea9143 (diff)
parentd7aa3aab5e40747e71d091d8033207f4363fb59c (diff)
downloadforums-c3aa466523e9b074bc4479eccc7b0514972f4b28.tar
forums-c3aa466523e9b074bc4479eccc7b0514972f4b28.tar.gz
forums-c3aa466523e9b074bc4479eccc7b0514972f4b28.tar.bz2
forums-c3aa466523e9b074bc4479eccc7b0514972f4b28.tar.xz
forums-c3aa466523e9b074bc4479eccc7b0514972f4b28.zip
Merge branch 'develop-olympus' into develop
* develop-olympus: [ticket/9079] Always log backtrace to error log when logging errors. [ticket/9079] Display backtrace on all E_USER_ERROR errors, not only SQL errors
Diffstat (limited to 'phpBB/includes/functions.php')
-rw-r--r--phpBB/includes/functions.php14
1 files changed, 13 insertions, 1 deletions
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php
index 753795b7cf..a60edb5cee 100644
--- a/phpBB/includes/functions.php
+++ b/phpBB/includes/functions.php
@@ -3796,11 +3796,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_'))
+ {
+ $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);
}