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