Skip to content

Commit

Permalink
When testing for CNAME records, do not error if the current record is…
Browse files Browse the repository at this point in the history
… the only CNAME... Fix #31
  • Loading branch information
ShaneMcC committed Nov 11, 2018
1 parent 72a32ae commit ee6d2be
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion classes/record.php
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ public function validate() {
}
} else {
foreach ($domain->getRecords($nameFilter, 'CNAME') as $r) {
if ($r->isDisabled() || $this->isDisabled()) { continue; }
if ($r->isDisabled() || $this->isDisabled() || $r->getID() == $this->getID()) { continue; }

throw new ValidationFailed('There already exists a CNAME for this record: ' . $nameFilter);
}
Expand Down

0 comments on commit ee6d2be

Please sign in to comment.