WillyXJ / facileManager

A modular suite of web apps built with the sysadmin in mind.
www.facilemanager.com
GNU General Public License v2.0
84 stars 37 forks source link

[BUG] PHP warnings when editing zone configuration #630

Closed imyller closed 1 month ago

imyller commented 1 month ago

fM Version : 4.6.2 fmDNS Version : 6.0.5

Debian 12 (Bookworm) PHP 8.2.18 Apache 2.4.59

In raising this issue, I confirm the following (please check boxes, eg [X]):


(BUG | ISSUE) Expected Behavior:

Zone edit works without PHP errors and warnings.

(BUG | ISSUE) Actual Behavior:

`Warning: Array to string conversion in /opt/facileManager/server/fm-modules/fmDNS/classes/class_zones.php on line 1280

Warning: Undefined property: stdClass::$domain_id in /opt/facileManager/server/fm-modules/fmDNS/classes/class_zones.php on line 1285

Warning: Undefined property: stdClass::$domain_name in /opt/facileManager/server/fm-modules/fmDNS/classes/class_zones.php on line 1286

Warning: Undefined property: stdClass::$domain_mapping in /opt/facileManager/server/fm-modules/fmDNS/classes/class_zones.php on line 1287

Warning: Undefined property: stdClass::$domain_mapping in /opt/facileManager/server/fm-modules/fmDNS/classes/class_zones.php on line 1293

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /opt/facileManager/server/fm-modules/fmDNS/classes/class_zones.php on line 1294

Warning: Undefined property: stdClass::$record_count in /opt/facileManager/server/fm-modules/fmDNS/classes/class_zones.php on line 1302

Warning: Undefined property: stdClass::$domain_view in /opt/facileManager/server/fm-modules/fmDNS/classes/class_zones.php on line 1307`

Click zone 'Edit':

editerr2

Results in:

editerrr4

(BUG | ISSUE) Steps to reproduce:

WillyXJ commented 1 month ago

This is now fixed in fmDNS 6.0.6 and later.

imyller commented 2 weeks ago

Fix caused regression:

701phperr
Warning: Array to string conversion in /opt/facileManager/server/fm-modules/fmDNS/functions.php on line 701

in functions.php getZoneServers function:

return (string) $serial_no;