From 677dc5d2e11c3209fcaf798e4b44588a9305328f Mon Sep 17 00:00:00 2001 From: David M Date: Tue, 26 Dec 2006 20:49:20 +0000 Subject: [PATCH] #6598 - should have fixed all uses of curly braces git-svn-id: file:///svn/phpbb/trunk@6813 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/functions_user.php | 6 +++--- phpBB/includes/message_parser.php | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/phpBB/includes/functions_user.php b/phpBB/includes/functions_user.php index a8fb455cdf..0ac9b7b97b 100644 --- a/phpBB/includes/functions_user.php +++ b/phpBB/includes/functions_user.php @@ -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 = ''; } diff --git a/phpBB/includes/message_parser.php b/phpBB/includes/message_parser.php index 9751ab676e..07ba6c5b00 100644 --- a/phpBB/includes/message_parser.php +++ b/phpBB/includes/message_parser.php @@ -445,7 +445,7 @@ class bbcode_firstpass extends bbcode $code = preg_replace('#(?:[\n\r\s\t]| )*$#u', '', $code); // remove newline at the end - if (!empty($code) && $code{strlen($code)-1} == "\n") + if (!empty($code) && $code[strlen($code) - 1] == "\n") { $code = substr($code, 0, -1); }