Actions
Bug #16305
openCannot access offset of type string on string in /usr/local/pkg/pfblockerng/pfblockerng.inc:5296
Status:
Confirmed
Priority:
Normal
Assignee:
-
Category:
pfBlockerNG
Target version:
-
Start date:
Due date:
% Done:
0%
Estimated time:
Plus Target Version:
Affected Version:
Affected Plus Version:
24.11
Affected Architecture:
Description
Entire error from system log:
<11>1 2025-07-10T21:03:12.800642+00:00 pfSense1.FQ.local php_pfb 50470 - - /usr/local/pkg/pfblockerng/pfblockerng.inc: PHP ERROR: Type: 1, File: /usr/local/pkg/pfblockerng/pfblockerng.inc, Line: 5296, Message: Uncaught TypeError: Cannot access offset of type string on string in /usr/local/pkg/pfblockerng/pfblockerng.inc:5296
Line 5296 is if (is_array($dhcp['staticmap'])) {
in:
// Collect static DHCP hostnames/IPs foreach (config_get_path('dhcpd', []) as $dhcp) { if (is_array($dhcp['staticmap'])) { foreach ($dhcp['staticmap'] as $smap) { $local_hosts[$smap['ipaddr']] = strtolower("{$smap['hostname']}"); } } } </pre
Updated by Christopher Cope 2 months ago
- Status changed from New to Confirmed
Confirmed this issue.
It seems $dhcp is returning a non-array value, due to an empty interface tag in the dhcpd section.
A check that $dhcp is an array before the current check should be all that's needed. I'll put together a quick patch and put in a merge request.
Actions