curly braces to pick a character in string is not recommended

This commit is contained in:
Mikael Nordfeldth 2013-11-11 00:45:30 +01:00
parent 73fe8a81b7
commit 1349eb349a

View File

@ -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;
}