valitron
valitron copied to clipboard
bccomp(): bcmath function argument is not well-formed
Hi! I'm getting this error in vlucas\valitron\src\Valitron\Validator.php line 366 On Windows.
I think it's an issue with php version 7.4.18 (win), because on php 7.3.29 (linux) it doesn't happen.
I've done a bit of reading and you're idea seems correct: https://www.php.net/manual/en/migration74.incompatible.php "BCMath functions will now warn if a non well-formed number is passed, such as "32foo". The argument will be interpreted as zero, as before." I think we need to make sure the number is well-formed before passing it to bcmath