Skip to content

Commit

Permalink
Merge pull request #833 from dpfaffenbauer/code-generator
Browse files Browse the repository at this point in the history
[Order] fix code-generator length
  • Loading branch information
dpfaffenbauer authored Feb 23, 2019
2 parents f1407d5 + ee49c62 commit 7fd32aa
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ protected static function generateCode($letters, $length)
$i = 0;
$code = '';

while ($i <= $length) {
while ($i < $length) {
$num = rand() % 33;
$tmp = substr($letters, $num, 1);
$code = $code . $tmp;
Expand Down

0 comments on commit 7fd32aa

Please sign in to comment.