From 3503830c47600fdb7ce5df806030cdc7d1dd3f53 Mon Sep 17 00:00:00 2001 From: David M Date: Tue, 19 Dec 2006 23:48:32 +0000 Subject: [PATCH] #6436, thanks ToonArmy for the patch :D git-svn-id: file:///svn/phpbb/trunk@6783 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/functions.php | 4 ++-- 1 file 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++)