Fixed a bug where two identical symbols appeared in a captcha.
The commit fixes an issue where wrong variable was passed as second argument to randomSymbols method. Previously it was using an uninitialized variable 'fakes' which was supposed to be populated by 'success' variable. The 'success' variable already has the set of valid symbols which should be used to generate fake symbols for captcha.
This commit is contained in:
parent
520a3ba068
commit
10425db5e0
@ -19,7 +19,7 @@ final class StringType extends Type
|
|||||||
$success = $this->randomSymbols($lengthSymbols);
|
$success = $this->randomSymbols($lengthSymbols);
|
||||||
$fakes = [];
|
$fakes = [];
|
||||||
if (!empty($lengthFakeSymbols)) {
|
if (!empty($lengthFakeSymbols)) {
|
||||||
$fakes = $this->randomSymbols($lengthFakeSymbols, $fakes);
|
$fakes = $this->randomSymbols($lengthFakeSymbols, $success);
|
||||||
}
|
}
|
||||||
|
|
||||||
return new Symbols(
|
return new Symbols(
|
||||||
|
Loading…
Reference in New Issue
Block a user