]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
curly braces to pick a character in string is not recommended
authorMikael Nordfeldth <mmn@hethane.se>
Sun, 10 Nov 2013 23:45:30 +0000 (00:45 +0100)
committerMikael Nordfeldth <mmn@hethane.se>
Sun, 10 Nov 2013 23:45:30 +0000 (00:45 +0100)
lib/util.php

index 7999afbd143652ca5b10d9c2064036e97bb66933..7b75a467843f1c56452c3d1218c76cd166000712 100644 (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;
 }