zxcvbn-php
zxcvbn-php copied to clipboard
Fix type error
This fix Uncaught TypeError: factorial(): Return value must be of type int, float returned
. If the $n
parameter in factorial()
is bigger than 20, it will cause type error because PHP converts int to float.
Demonstration: https://onlinephp.io/c/3bbad
Can confirm this
Do you have a sample of what input is triggering this?
@Xon no. Passwords in our logs are anonymized so I can't give you the input value that triggered this error. But it is very rare.
Password: 123 12345 654321 abcdef gfedcb kuulilennuteetunneliluuk dog fghij mnopq 66666 1010101 loop
Isn't this caused by the changes in 1.3.1? Is it same problem in 1.3.0?
Also, why not just say the function can return a float, as a solution?