aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--phpBB/includes/functions.php21
1 files changed, 7 insertions, 14 deletions
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php
index b203dcbea3..5f90093bd0 100644
--- a/phpBB/includes/functions.php
+++ b/phpBB/includes/functions.php
@@ -3401,22 +3401,15 @@ function get_backtrace()
{
// Strip the current directory from path
$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
- if (!in_array($trace['function'], array('include', 'require', 'include_once')))
- {
- unset($trace['args']);
- }
- else
+ // Only show function arguments for include etc.
+ // Other parameters may contain sensible information
+ $args = array();
+ if (!empty($trace['args'][0]) && in_array($trace['function'], array('include', 'require', 'include_once')))
{
- // Path...
- if (!empty($trace['args'][0]))
- {
- $argument = htmlspecialchars($trace['args'][0]);
- $argument = phpbb_filter_root_path($argument);
- $args[] = "'{$argument}'";
- }
+ $argument = htmlspecialchars($trace['args'][0]);
+ $argument = phpbb_filter_root_path($argument);
+ $args[] = "'{$argument}'";
}
$trace['class'] = (!isset($trace['class'])) ? '' : $trace['class'];