mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-30 21:40:43 +02:00
fixing one severe bug showing since 5.2.4
git-svn-id: file:///svn/phpbb/trunk@8201 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
@@ -683,6 +683,12 @@ if (!function_exists('realpath'))
|
||||
// Put the slashes back to the native operating systems slashes
|
||||
$resolved = str_replace('/', DIRECTORY_SEPARATOR, $resolved);
|
||||
|
||||
// Check for DIRECTORY_SEPARATOR at the end (and remove it!)
|
||||
if (substr($resolved, -1) == DIRECTORY_SEPARATOR)
|
||||
{
|
||||
return substr($resolved, 0, -1);
|
||||
}
|
||||
|
||||
return $resolved; // We got here, in the end!
|
||||
}
|
||||
}
|
||||
@@ -694,7 +700,15 @@ else
|
||||
*/
|
||||
function phpbb_realpath($path)
|
||||
{
|
||||
return realpath($path);
|
||||
$path = realpath($path);
|
||||
|
||||
// Check for DIRECTORY_SEPARATOR at the end (and remove it!)
|
||||
if (substr($path, -1) == DIRECTORY_SEPARATOR)
|
||||
{
|
||||
return substr($path, 0, -1);
|
||||
}
|
||||
|
||||
return $path;
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user