diff --git a/src/Egulias/EmailValidator/EmailValidator.php b/src/Egulias/EmailValidator/EmailValidator.php index a3bc1d9..d047dec 100644 --- a/src/Egulias/EmailValidator/EmailValidator.php +++ b/src/Egulias/EmailValidator/EmailValidator.php @@ -84,7 +84,7 @@ public function isValid($email, $checkDNS = false, $strict = false) return false; } - $dns = false; + $dns = true; if ($checkDNS) { $dns = $this->checkDNS(); } @@ -95,12 +95,7 @@ public function isValid($email, $checkDNS = false, $strict = false) return false; } - return ($strict) ? $this->checkStrict($dns) : true; - } - - private function checkStrict($dns) - { - return !($this->hasWarnings() && !$dns); + return !$strict || (!$this->hasWarnings() && $dns); } /**