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.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php
index 4511c57408..04113fae06 100644
--- a/phpBB/includes/functions.php
+++ b/phpBB/includes/functions.php
@@ -524,8 +524,8 @@ if (!function_exists('realpath'))
// Break the string into little bits for us to nibble on
$bits = explode('/', $path);
- // Remove any . in the path
- $bits = array_diff($bits, array('.'));
+ // Remove any . in the path, renumber array for the loop below
+ $bits = array_keys(array_diff($bits, array('.')));
// Lets get looping, run over and resolve any .. (up directory)
for ($i = 0, $max = sizeof($bits); $i < $max; $i++)