Project

General

Profile

Actions

Regression #13514

closed

Feature #13446: Upgrade PHP from 7.4 to 8.1

PHP 8.1 - Syntax error when disabling a gateway under SYSTEM > GATEWAYS > EDIT

Added by Bill Meeks over 1 year ago. Updated over 1 year ago.

Status:
Resolved
Priority:
Normal
Category:
Gateways
Target version:
Start date:
Due date:
% Done:

100%

Estimated time:
Plus Target Version:
23.01
Release Notes:
Force Exclusion
Affected Version:
2.7.0
Affected Architecture:
All

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.

Actions #1

Updated by Chris W over 1 year 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.

Actions #2

Updated by Chris W over 1 year ago

  • Status changed from New to Confirmed
Actions #3

Updated by Christian McDonald over 1 year ago

  • Status changed from Confirmed to Feedback
  • Assignee set to Christian McDonald
  • Release Notes changed from Default to Force Exclusion

Fixed

Actions #4

Updated by Jordan G over 1 year ago

this is also present on Plus 20221001-0252 build of 22.11 fyi

Actions #5

Updated by Danilo Zrenjanin over 1 year 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.

Actions #6

Updated by Jim Pingle over 1 year ago

  • Target version set to 2.7.0
  • Parent task set to #13446
  • Plus Target Version set to 23.01
Actions #7

Updated by Jim Pingle over 1 year ago

  • Tracker changed from Bug to Regression
Actions #8

Updated by Jim Pingle over 1 year ago

  • % Done changed from 0 to 100
Actions

Also available in: Atom PDF