From 1349eb349ac787ddce3d27b878c2646089e11656 Mon Sep 17 00:00:00 2001 From: Mikael Nordfeldth Date: Mon, 11 Nov 2013 00:45:30 +0100 Subject: [PATCH] curly braces to pick a character in string is not recommended --- lib/util.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } -- 2.39.5