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

Closed
opened 2026-03-14 12:11:10 +03:00 by kerem · 2 comments
Owner

Originally created by @mozg3000 on GitHub (Dec 12, 2023).
Original GitHub issue: https://github.com/antonioribeiro/google2fa/issues/192

A comma at this line of a code crashes php script
github.com/antonioribeiro/google2fa@98c9e0544c/src/Google2FA.php (L396)

because it is not allowed for php version < 8

Originally created by @mozg3000 on GitHub (Dec 12, 2023). Original GitHub issue: https://github.com/antonioribeiro/google2fa/issues/192 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
kerem closed this issue 2026-03-14 12:11:15 +03:00
Author
Owner

@spaze commented on GitHub (Feb 29, 2024):

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.

<!-- gh-comment-id:1970348111 --> @spaze commented on GitHub (Feb 29, 2024): 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.
Author
Owner

@spaze commented on GitHub (Sep 6, 2024):

Fixed in #211

<!-- gh-comment-id:2333188727 --> @spaze commented on GitHub (Sep 6, 2024): Fixed in #211
Sign in to join this conversation.
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/google2fa#554
No description provided.