From 2ec7babda64bcac584de3d2d7a505ae4d0f34e9c Mon Sep 17 00:00:00 2001 From: Christian Raue Date: Tue, 4 Nov 2014 09:31:07 +0100 Subject: [PATCH] fixed strict check --- src/Egulias/EmailValidator/EmailValidator.php | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) 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); } /**