mirror of
https://github.com/egulias/EmailValidator.git
synced 2026-09-02 05:27:52 +00:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| f46887bc48 |
@@ -118,11 +118,12 @@ class DNSCheckValidation implements EmailValidation
|
|||||||
private function validateDnsRecords($host)
|
private function validateDnsRecords($host)
|
||||||
{
|
{
|
||||||
// Get all MX, A and AAAA DNS records for 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
|
// No MX, A or AAAA DNS records
|
||||||
if (empty($dnsRecords)) {
|
if (empty($dnsRecords) || !$dnsRecords) {
|
||||||
$this->error = new NoDNSRecord();
|
$this->error = new NoDNSRecord();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user