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 exception when validating new A record #625

Closed millallo closed 2 months ago

millallo commented 3 months ago

fM Version : 4.6.1 fmDNS Version : 6.0.4 PHP: 7.4

(BUG | ISSUE) Expected Behavior: Create an A record with 'Create PTR' flag and without existent reverse zone. I expect validation ok.

(BUG | ISSUE) Actual Behavior: After clicking on 'Validate' button an exception is thrown.

(BUG | ISSUE) Steps to reproduce: Create a new A record with 'Create PTR' flag. The reverse zone should not exists. An exception is thrown

<br />
<b>Fatal error</b>:  Uncaught Error: [] operator not supported for strings in /var/www/html/facileManager/server/fm-modules/fmDNS/functions.php:694
Stack trace:
#0 /var/www/html/facileManager/server/fm-modules/fmDNS/classes/class_zones.php(341): getZoneServers()
#1 /var/www/html/facileManager/server/fm-modules/fmDNS/functions.php(1312): fm_dns_zones-&gt;add()
#2 /var/www/html/facileManager/server/fm-modules/fmDNS/functions.php(1272): autoCreatePTRZone()
#3 /var/www/html/facileManager/server/fm-modules/fmDNS/pages/zone-records-validate.php(239): checkPTRZone()
#4 /var/www/html/facileManager/server/fm-modules/fmDNS/pages/zone-records-validate.php(130): validateEntry()
#5 /var/www/html/facileManager/server/fm-modules/fmDNS/pages/zone-records-validate.php(69): createOutput()
#6 /var/www/html/facileManager/server/index.php(57): include('/var/www/html/f...')
#7 {main}
  thrown in <b>/var/www/html/facileManager/server/fm-modules/fmDNS/functions.php</b> on line <b>694</b><br />
millallo commented 2 months ago

duplicate #622 622