Since PowerDNS 4.2.0-rc1 non existing zones will return 404 instead of 422 (https://github.com/PowerDNS/pdns/pull/6076) that results in "Oops" on dns-ui after zone deletion and breaks history page.
This commit maintains backward compatibility to versions before PowerDNS 4.2; also maintains code compatibility before PHP 7.1.
Since PowerDNS 4.2.0-rc1 non existing zones will return 404 instead of 422 (https://github.com/PowerDNS/pdns/pull/6076) that results in "Oops" on dns-ui after zone deletion and breaks history page. This commit maintains backward compatibility to versions before PowerDNS 4.2; also maintains code compatibility before PHP 7.1.
This fixes #160