Skip to content

Commit

Permalink
Fix #260 with workaround (#261)
Browse files Browse the repository at this point in the history
  • Loading branch information
egulias committed Sep 6, 2020
1 parent 840d560 commit f46887b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Validation/DNSCheckValidation.php
Original file line number Diff line number Diff line change
Expand Up @@ -118,11 +118,12 @@ protected function checkDns($host)
private function validateDnsRecords($host)
{
// Get all MX, A and AAAA DNS records for host
$dnsRecords = dns_get_record($host, DNS_MX + DNS_A + DNS_AAAA);
// Using @ as workaround to fix https://bugs.php.net/bug.php?id=73149
$dnsRecords = @dns_get_record($host, DNS_MX + DNS_A + DNS_AAAA);


// No MX, A or AAAA DNS records
if (empty($dnsRecords)) {
if (empty($dnsRecords) || !$dnsRecords) {
$this->error = new NoDNSRecord();
return false;
}
Expand Down

0 comments on commit f46887b

Please sign in to comment.