Project

General

Profile

Actions

Bug #16627

open

PHP error when saving without interfaces selected

Added by Holger Touby 3 days ago. Updated 1 day ago.

Status:
Feedback
Priority:
Normal
Assignee:
Category:
mDNS Bridge
Target version:
-
Start date:
Due date:
% Done:

100%

Estimated time:
Plus Target Version:
Affected Version:
Affected Plus Version:
Affected Architecture:
All

Description

I am encountering a reproducible PHP Fatal Error in the web GUI when interacting with the mDNS Bridge package on the latest 25.11 Development Snapshot.

System Information:

Version: pfSense Plus 25.11-SNAPSHOT

OS: FreeBSD 16.0-CURRENT (amd64)

Build: plus-RELENG_25_11-n256500-a43915e7ef55 (Mon Dec 1 19:02:15 UTC 2025)

The Error: When attempting to configure/disable the mDNS Bridge, the GUI crashes with the following error:

[08-Jan-2026 22:41:59 Europe/Berlin] PHP Fatal error: Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, null given in /usr/local/www/mdns-bridge.php:74
Stack trace:
#0 {main}
thrown in /usr/local/www/mdns-bridge.php on line 74
Context & Steps leading to the issue: Prior to this, I experienced severe instability with the Avahi package (Kernel Panics, HTTP 50x errors, complete console lockups requiring hard power cycles). The system even reverted to a previous 24.11 Boot Environment automatically.

To rule out filesystem corruption or hardware failure:

I replaced the internal storage with a fresh, hardware-compatible SSD.

Performed a clean install of the 25.11 Snapshot.

Applied standard system tunables (including increasing PHP memory limit to 2048MB).

After uninstalling Avahi and testing mDNS Bridge, the system stability improved significantly (no crashes). However, when I attempted to disable the mDNS Bridge service (as I was finishing my tests), the PHP error above was triggered immediately.

Analysis: It appears that mdns-bridge.php on line 74 is passing a null value to count(). Since PHP 8.x, count(null) throws a TypeError instead of a warning. This likely requires a check for is_array() or !empty() before counting the configuration array.


Files

error.report.txt (946 Bytes) error.report.txt Holger Touby, 01/08/2026 10:10 PM
clipboard-202601100959-cth3w.png (27.6 KB) clipboard-202601100959-cth3w.png Lev Prokofev, 01/10/2026 06:59 AM
Actions

Also available in: Atom PDF