Fix #260 with workaround (#261)

This commit is contained in:
Eduardo Gulias Davis
2020-09-06 15:44:32 +02:00
committed by GitHub
parent 840d5603eb
commit f46887bc48
+3 -2
View File
@@ -118,11 +118,12 @@ class DNSCheckValidation implements EmailValidation
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;
}