diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php
index 5f90093bd0..df5a05f53b 100644
--- a/phpBB/includes/functions.php
+++ b/phpBB/includes/functions.php
@@ -3404,12 +3404,11 @@ function get_backtrace()
// Only show function arguments for include etc.
// Other parameters may contain sensible information
- $args = array();
+ $argument = '';
if (!empty($trace['args'][0]) && in_array($trace['function'], array('include', 'require', 'include_once')))
{
$argument = htmlspecialchars($trace['args'][0]);
$argument = phpbb_filter_root_path($argument);
- $args[] = "'{$argument}'";
}
$trace['class'] = (!isset($trace['class'])) ? '' : $trace['class'];
@@ -3419,7 +3418,8 @@ function get_backtrace()
$output .= 'FILE: ' . htmlspecialchars($trace['file']) . '
';
$output .= 'LINE: ' . ((!empty($trace['line'])) ? $trace['line'] : '') . '
';
- $output .= 'CALL: ' . htmlspecialchars($trace['class'] . $trace['type'] . $trace['function']) . '(' . ((sizeof($args)) ? implode(', ', $args) : '') . ')
';
+ $output .= 'CALL: ' . htmlspecialchars($trace['class'] . $trace['type'] . $trace['function']);
+ $output .= '(' . (($argument !== '') ? "'$argument'" : '') . ')
';
}
$output .= '';
return $output;