antonioribeiro / google2fa

A One Time Password Authentication package, compatible with Google Authenticator.
MIT License
1.83k stars 199 forks source link

Typo in a code of the Google2FA class on line 397 (8.x - php 7.4) #192

Open mozg3000 opened 9 months ago

mozg3000 commented 9 months ago

A comma at this line of a code crashes php script https://github.com/antonioribeiro/google2fa/blob/98c9e0544c9467b427c323a54a193a8f3b5762ec/src/Google2FA.php#L396

because it is not allowed for php version < 8

spaze commented 6 months ago

Thanks for the bug, after reading the report I've realized that the tests aren't actually using the selected PHP version and are always executed with the latest PHP version so the code with the trailing comma was never executed on PHP 7.x.

And the trailing comma was also introduced by me in #187, sorry.

The fix for both is in #196, hopefully it will be merged and released soon.

spaze commented 2 days ago

Fixed in #211