diff options
Diffstat (limited to 'phpBB/includes/functions.php')
-rw-r--r-- | phpBB/includes/functions.php | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index 60181c488e..213f178694 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -5745,16 +5745,12 @@ function phpbb_get_web_root_path(Request $symfony_request) $path_info = $symfony_request->getPathInfo(); if ($path_info == '/') { - return ''; + $path = ''; + return $path; } - $corrections = substr_count($symfony_request->getPathInfo(), '/'); - - $path = ''; - for ($i = 0; $i < $corrections; $i++) - { - $path .= '../'; - } + $corrections = substr_count($path_info, '/'); + $path = str_repeat('../', $corrections); return $path; } |