Regression #13719
closedFeature #13446: Upgrade PHP from 7.4 to 8.1
PHP8.1 error when saving DHCP Server settings.
100%
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
Related issues