Regression #13514
closedFeature #13446: Upgrade PHP from 7.4 to 8.1
PHP 8.1 - Syntax error when disabling a gateway under SYSTEM > GATEWAYS > EDIT
100%
Description
Running the September 22, 2022 "PHP 8.1 and FreeBSD Main" snapshot in a VMware virtual machine.
When attempting to disable a gateway (in this case the WAN_DHCP6 gateway because I don't have IPv6 available on the WAN) the following PHP error is thrown when attempting to save the change:
amd64
14.0-CURRENT
FreeBSD 14.0-CURRENT #0 devel-main-n255797-d8d104eec65: Thu Sep 22 18:54:16 UTC 2022 root@freebsd:/var/jenkins/workspace/pfSense-CE-snapshots-master-main/obj/amd64/YVYTCXmQ/var/jenkins/workspace/pfSense-CE-snapshots-master-main/sources/FreeBSD-src-dev
Crash report details:
PHP Errors:
[24-Sep-2022 09:54:19 America/New_York] PHP Fatal error: Uncaught TypeError: Cannot access offset of type string on string in /etc/inc/gwlb.inc:1788
Stack trace:
#0 /usr/local/www/system_gateways_edit.php(99): validate_gateway(Array, '1')
#1 {main}
thrown in /etc/inc/gwlb.inc on line 1788
I was attempting to disable the gateway as there is no routable IPv6 address on my test virtual machine's WAN.
Updated by Chris W about 2 years ago
Confirmed on latest build (running on KVM, and IPv6 was switched off upstream):
2.7.0-DEVELOPMENT (amd64)
built on Fri Sep 30 09:07:00 UTC 2022
FreeBSD 14.0-CURRENT
I went to System > Routing > Gateways. Edited the default WAN_DHCP6 gateway, checked the Disable this gateway button, clicked Save, and immediately got:
Fatal error: Uncaught TypeError: Cannot access offset of type string on string in /etc/inc/gwlb.inc:1788 Stack trace: #0 /usr/local/www/system_gateways_edit.php(99): validate_gateway(Array, '1') #1 {main} thrown in /etc/inc/gwlb.inc on line 1788 PHP ERROR: Type: 1, File: /etc/inc/gwlb.inc, Line: 1788, Message: Uncaught TypeError: Cannot access offset of type string on string in /etc/inc/gwlb.inc:1788 Stack trace: #0 /usr/local/www/system_gateways_edit.php(99): validate_gateway(Array, '1') #1 {main} thrown
Hit the browser back button and this dump was available:
Crash report begins. Anonymous machine information: amd64 14.0-CURRENT FreeBSD 14.0-CURRENT #0 devel-main-n255797-d8d104eec65: Fri Sep 30 09:30:47 UTC 2022 root@freebsd:/var/jenkins/workspace/pfSense-CE-snapshots-master-main/obj/amd64/Oe783mLU/var/jenkins/workspace/pfSense-CE-snapshots-master-main/sources/FreeBSD-src-dev Crash report details: PHP Errors: [01-Oct-2022 11:55:20 America/Denver] PHP Fatal error: Uncaught TypeError: Cannot access offset of type string on string in /etc/inc/gwlb.inc:1788 Stack trace: #0 /usr/local/www/system_gateways_edit.php(99): validate_gateway(Array, '1') #1 {main} thrown in /etc/inc/gwlb.inc on line 1788 No FreeBSD crash data found.
For what it's worth, the same happens when trying to disable the default WAN_DHCP gateway.
Updated by Christian McDonald about 2 years ago
- Status changed from Confirmed to Feedback
- Assignee set to Christian McDonald
- Release Notes changed from Default to Force Exclusion
Fixed
Updated by Jordan G about 2 years ago
this is also present on Plus 20221001-0252 build of 22.11 fyi
Updated by Danilo Zrenjanin about 2 years ago
- Status changed from Feedback to Resolved
Tested:
2.7.0-DEVELOPMENT (amd64) built on Thu Oct 06 06:04:33 UTC 2022 FreeBSD 14.0-CURRENT
It works as expected. I am marking this thicket resolved.
Updated by Jim Pingle about 2 years ago
- Target version set to 2.7.0
- Parent task set to #13446
- Plus Target Version set to 23.01