Regression #13890
closedFeature #13446: Upgrade PHP from 7.4 to 8.1
Captive Portal Voucher Rolls Status "Fatal error"
100%
Description
When enabled & Created Vouchers under Captive Portal, Status -----> Captive Portal -----> Voucher Rolls not showing rolls instead showing Fatal Error
Crash report begins. Anonymous machine information: amd64 14.0-CURRENT FreeBSD 14.0-CURRENT #0 devel-main-n255825-17d2b04a49e: Wed Jan 18 15:58:21 UTC 2023 root@freebsd:/var/jenkins/workspace/pfSense-CE-snapshots-master-main/obj/amd64/zkNuv2c1/var/jenkins/workspace/pfSense-CE-snapshots-master-main/sources/FreeBSD-src-dev Crash report details: PHP Errors: [20-Jan-2023 00:01:12 Asia/Dubai] PHP Fatal error: Uncaught ValueError: count(): Argument #2 ($mode) must be either COUNT_NORMAL or COUNT_RECURSIVE in /usr/local/www/status_captiveportal_voucher_rolls.php:95 Stack trace: #0 /usr/local/www/status_captiveportal_voucher_rolls.php(95): count(Array, '43200') #1 {main} thrown in /usr/local/www/status_captiveportal_voucher_rolls.php on line 95 [20-Jan-2023 00:06:11 Asia/Dubai] PHP Fatal error: Uncaught ValueError: count(): Argument #2 ($mode) must be either COUNT_NORMAL or COUNT_RECURSIVE in /usr/local/www/status_captiveportal_voucher_rolls.php:95 Stack trace: #0 /usr/local/www/status_captiveportal_voucher_rolls.php(95): count(Array, '43200') #1 {main} thrown in /usr/local/www/status_captiveportal_voucher_rolls.php on line 95 No FreeBSD crash data found.
I have most recent pfsense CE Base System 2.7.0.a.20230118.1528
Files
Updated by Jim Pingle almost 2 years ago
- Status changed from New to Confirmed
- Target version set to 2.7.0
- Plus Target Version set to 23.01
Updated by Jim Pingle almost 2 years ago
- Status changed from Confirmed to In Progress
- Assignee set to Jim Pingle
Updated by Jim Pingle almost 2 years ago
- Parent task set to #13446
- Release Notes changed from Default to Force Exclusion
For some reason that page has always unnecessarily passed a second parameter to count()
there and on old versions of PHP that was ignored and now it's a fatal error on PHP 8.
I removed the second parameter and the page seems to behave normally. It shows proper counts of used/active/ready vouchers for me now.
Commit coming momentarily.
Updated by Jim Pingle almost 2 years ago
- Status changed from In Progress to Feedback
- % Done changed from 0 to 100
Applied in changeset ef353af0b40a98d4ce0ee2638206f10ac67e212b.
Updated by Muhammad Waseem Ul Haq almost 2 years ago
I updated today to most recent version 2.7.0.a.20230120.0255 and confirm that Voucher Rolls status is working perfectly now. no more errors.
Updated by Jim Pingle almost 2 years ago
- Status changed from Feedback to Resolved
Thanks for testing!
The same is true here as well. I could crash multiple lab systems before the fix, and after the fix they are all working as expected.