mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-04 15:57:45 +02:00
- should have fixed all uses of curly braces git-svn-id: file:///svn/phpbb/trunk@6813 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
@@ -1406,13 +1406,13 @@ function avatar_upload($data, &$error)
|
||||
|
||||
$destination = $config['avatar_path'];
|
||||
|
||||
if ($destination{(sizeof($destination)-1)} == '/' || $destination{(sizeof($destination)-1)} == '\\')
|
||||
if ($destination[sizeof($destination) - 1] == '/' || $destination[sizeof($destination) - 1] == '\\')
|
||||
{
|
||||
$destination = substr($destination, 0, sizeof($destination)-2);
|
||||
$destination = substr($destination, 0, -1);
|
||||
}
|
||||
|
||||
$destination = str_replace(array('../', '..\\', './', '.\\'), '', $destination);
|
||||
if ($destination && ($destination[0] == '/' || $destination[0] == "\\"))
|
||||
if ($destination && ($destination[0] == '/' || $destination[0] == '\\'))
|
||||
{
|
||||
$destination = '';
|
||||
}
|
||||
|
Reference in New Issue
Block a user