From: Mikael Nordfeldth Date: Sun, 10 Nov 2013 23:45:30 +0000 (+0100) Subject: curly braces to pick a character in string is not recommended X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=1349eb349ac787ddce3d27b878c2646089e11656;p=quix0rs-gnu-social.git curly braces to pick a character in string is not recommended --- diff --git a/lib/util.php b/lib/util.php index 7999afbd14..7b75a46784 100644 --- a/lib/util.php +++ b/lib/util.php @@ -1534,7 +1534,7 @@ function common_random_hexstr($bytes) $hexstr = ''; for ($i = 0; $i < $bytes; $i++) { - $hexstr .= sprintf("%02x", ord($str{$i})); + $hexstr .= sprintf("%02x", ord($str[$i])); } return $hexstr; }