Skip to content

Commit

Permalink
Merge branch hotfix/v2.1.46
Browse files Browse the repository at this point in the history
  • Loading branch information
roadiz-ci committed Sep 28, 2023
1 parent 220b62a commit ba4b483
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/PasswordGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ public function generatePassword(int $length = 12)
$all = '';
$password = '';
foreach ($sets as $set) {
$password .= $set[array_rand(str_split($set))];
$password .= $set[array_rand(\mb_str_split($set))];
$all .= $set;
}

$all = str_split($all);
$all = \mb_str_split($all);
for ($i = 0; $i < $length - count($sets); $i++) {
$password .= $all[array_rand($all)];
}
Expand Down

0 comments on commit ba4b483

Please sign in to comment.