aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes
diff options
context:
space:
mode:
authorAndreas Fischer <bantu@phpbb.com>2011-09-19 16:57:09 +0200
committerAndreas Fischer <bantu@phpbb.com>2011-09-19 16:57:09 +0200
commit9c0f75fd65e51212f5ef61e901420ea2f14a7a38 (patch)
tree785aeed1e4407d2eacc4613b2d3b8d5e6bbc8de3 /phpBB/includes
parent410028eecf7a6d8a7c2a66a81e91995de2447e4f (diff)
downloadforums-9c0f75fd65e51212f5ef61e901420ea2f14a7a38.tar
forums-9c0f75fd65e51212f5ef61e901420ea2f14a7a38.tar.gz
forums-9c0f75fd65e51212f5ef61e901420ea2f14a7a38.tar.bz2
forums-9c0f75fd65e51212f5ef61e901420ea2f14a7a38.tar.xz
forums-9c0f75fd65e51212f5ef61e901420ea2f14a7a38.zip
[ticket/10370] Use phpbb_filter_root_path() in get_backtrace().
PHPBB3-10370
Diffstat (limited to 'phpBB/includes')
-rw-r--r--phpBB/includes/functions.php16
1 files changed, 2 insertions, 14 deletions
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php
index e01bbe36d1..c2c8e489df 100644
--- a/phpBB/includes/functions.php
+++ b/phpBB/includes/functions.php
@@ -3391,11 +3391,8 @@ function add_log()
*/
function get_backtrace()
{
- global $phpbb_root_path;
-
$output = '<div style="font-family: monospace;">';
$backtrace = debug_backtrace();
- $path = phpbb_realpath($phpbb_root_path);
foreach ($backtrace as $number => $trace)
{
@@ -3406,15 +3403,7 @@ function get_backtrace()
}
// Strip the current directory from path
- if (empty($trace['file']))
- {
- $trace['file'] = '';
- }
- else
- {
- $trace['file'] = str_replace(array($path, '\\'), array('', '/'), $trace['file']);
- $trace['file'] = substr($trace['file'], 1);
- }
+ $trace['file'] = (empty($trace['file'])) ? '' : phpbb_filter_root_path($trace['file']);
$args = array();
// If include/require/include_once is not called, do not show arguments - they may contain sensible information
@@ -3428,8 +3417,7 @@ function get_backtrace()
if (!empty($trace['args'][0]))
{
$argument = htmlspecialchars($trace['args'][0]);
- $argument = str_replace(array($path, '\\'), array('', '/'), $argument);
- $argument = substr($argument, 1);
+ $argument = phpbb_filter_root_path($argument);
$args[] = "'{$argument}'";
}
}