diff --git a/interface/web/dns/dns_soa_edit.php b/interface/web/dns/dns_soa_edit.php index 0616c5652219ce034b8d6164eeb61d676d8c1856..30464a242bddba48ef4342cc5b09428117acb085 100644 --- a/interface/web/dns/dns_soa_edit.php +++ b/interface/web/dns/dns_soa_edit.php @@ -128,9 +128,9 @@ class page_action extends tform_actions { $this->dataRecord["serial"] = $app->validate_dns->increase_serial($soa["serial"]); //* Check if soa, ns and mbox have a dot at the end - if(substr($this->dataRecord["origin"],-1,1) != '.') $this->dataRecord["origin"] .= '.'; - if(substr($this->dataRecord["ns"],-1,1) != '.') $this->dataRecord["ns"] .= '.'; - if(substr($this->dataRecord["mbox"],-1,1) != '.') $this->dataRecord["mbox"] .= '.'; + if(strlen($this->dataRecord["origin"]) > 0 && substr($this->dataRecord["origin"],-1,1) != '.') $this->dataRecord["origin"] .= '.'; + if(strlen($this->dataRecord["ns"]) > 0 && substr($this->dataRecord["ns"],-1,1) != '.') $this->dataRecord["ns"] .= '.'; + if(strlen($this->dataRecord["mbox"]) > 0 && substr($this->dataRecord["mbox"],-1,1) != '.') $this->dataRecord["mbox"] .= '.'; //* Replace @ in mbox if(stristr($this->dataRecord["mbox"],'@')) {