aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/includes')
-rw-r--r--phpBB/includes/functions_user.php6
-rw-r--r--phpBB/includes/message_parser.php2
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]|&nbsp;)*</span>$#u', '</span>', $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);
}