mirror of
https://github.com/egulias/EmailValidator.git
synced 2026-08-30 20:18:04 +00:00
fixed strict check
This commit is contained in:
@@ -84,7 +84,7 @@ class EmailValidator
|
||||
return false;
|
||||
}
|
||||
|
||||
$dns = false;
|
||||
$dns = true;
|
||||
if ($checkDNS) {
|
||||
$dns = $this->checkDNS();
|
||||
}
|
||||
@@ -95,12 +95,7 @@ class EmailValidator
|
||||
return false;
|
||||
}
|
||||
|
||||
return ($strict) ? $this->checkStrict($dns) : true;
|
||||
}
|
||||
|
||||
private function checkStrict($dns)
|
||||
{
|
||||
return !($this->hasWarnings() && !$dns);
|
||||
return !$strict || (!$this->hasWarnings() && $dns);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user