Project

General

Profile

Actions

Regression #13719

closed

Feature #13446: Upgrade PHP from 7.4 to 8.1

PHP8.1 error when saving DHCP Server settings.

Added by Eric R almost 2 years ago. Updated almost 2 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
DHCP (IPv4)
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

BRANCH: DEVEL version (devel)
VERSION: 2.7.0.a.20221202.0600
ERROR MESSAGE: PHP Fatal error: Uncaught TypeError: Cannot access offset of type string on string in /usr/local/www/services_dhcp.php:454Stack trace:#0 {main}thrown in /usr/local/www/services_dhcp.php on line 454

Currently having a weird issue where any time I try to "Save" any changes to the DHCP Server. Even if I try to save without making any changes I get an error. I even tried making a second DHCP Server for a different interface and the same error occurs. I can't save anything without an error. I am getting the following error message:

  • PHP Fatal error: Uncaught TypeError: Cannot access offset of type string on string in /usr/local/www/services_dhcp.php:454Stack trace:#0 {main}thrown in /usr/local/www/services_dhcp.php on line 454

I checked line 454 and it contains the following: if (is_array($config['virtualip']['vip'])) {

// Disallow a range that includes the virtualip
if (is_array($config['virtualip']['vip'])) {
foreach ($config['virtualip']['vip'] as $vip) {
if ($vip['interface'] == $if) {
if ($vip['subnet'] && is_inrange_v4($vip['subnet'], $_POST['range_from'], $_POST['range_to'])) {
$input_errors[] = sprintf(gettext("The subnet range cannot overlap with virtual IP address %s."), $vip['subnet']);

Not sure if it's a bug in the DEV version I am on or if there is something else causing this to fail. Didn't have this issue a few days ago when I made some DNS changes but also haven't had to touch it until now.


Files

PHP_errors (1).log (238 Bytes) PHP_errors (1).log Eric R, 12/02/2022 03:21 PM
BUG.png (181 KB) BUG.png Steph Swiss, 12/04/2022 10:02 AM

Related issues

Has duplicate Regression #13629: Uncaught TypeError: Cannot access offset of type string on string in /usr/local/www/services_dhcp.phpDuplicate

Actions
Actions

Also available in: Atom PDF