Skip to content

Commit 14e772b

Browse files
authored
fix error on zone deletion & history function (#181)
1 parent d19489b commit 14e772b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

model/zone.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,8 +222,10 @@ public function &list_resource_record_sets() {
222222
$this->nameservers = array();
223223
try {
224224
$data = $this->powerdns->get('zones/'.urlencode($this->pdns_id));
225-
} catch(Pest_InvalidRecord $e) {
225+
} catch(Pest_InvalidRecord $e) { // before PowerDNS 4.2
226226
throw new ZoneNotFoundInPowerDNS;
227+
} catch(Pest_NotFound $e) { // 404 since PowerDNS 4.2
228+
throw new ZoneNotFoundInPowerDNS;;
227229
}
228230
$possible_bad_data = array();
229231
usort($data->rrsets,

0 commit comments

Comments
 (0)