curly braces to pick a character in string is not recommended
This commit is contained in:
parent
73fe8a81b7
commit
1349eb349a
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user