Random string generator couldn't generate strings that exceeded the number of available characters. This resolves that and allows for characters to show up more than once in the string itself.
This commit is contained in:
parent
9cd9304cf8
commit
761caf52cf
1 changed files with 1 additions and 1 deletions
|
@ -145,7 +145,7 @@ class String
|
|||
|
||||
for ($i = 0; $i < $length; $i++)
|
||||
{
|
||||
$string .= $characters[$i];
|
||||
$string .= $characters[array_rand($characters)];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue