Skip to content

Commit

Permalink
fix highRandomString random_bytes is float
Browse files Browse the repository at this point in the history
  • Loading branch information
cexll committed May 7, 2021
1 parent 7c4124e commit 0022dfa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/StringHelper.php
Expand Up @@ -260,7 +260,7 @@ public static function length(string $str, bool $filterTags = false): int
*/
public static function highRandomString(int $len = 12): string
{
return bin2hex(random_bytes((int)$len / 2));
return bin2hex(random_bytes((int)($len / 2)));
}

/**
Expand Down

0 comments on commit 0022dfa

Please sign in to comment.