aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions.php
diff options
context:
space:
mode:
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);
}