From a96f0822e0b5acc9e640b6ce4b84bd00c4e95c73 Mon Sep 17 00:00:00 2001 From: Brian Freytag Date: Wed, 20 Aug 2014 15:05:30 -0400 Subject: [PATCH] Change DNS validation to default to true instead of false There shouldn't be a dependency on the checkDNS() method in order to validate strict = true. We should only be concerned about the DNS if the library is specifically told to check DNS, so we default the DNS variable to true and then set it to false if checkDNS is set to true and checkDNS() returns false. --- src/Egulias/EmailValidator/EmailValidator.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Egulias/EmailValidator/EmailValidator.php b/src/Egulias/EmailValidator/EmailValidator.php index 877d422..34da636 100644 --- a/src/Egulias/EmailValidator/EmailValidator.php +++ b/src/Egulias/EmailValidator/EmailValidator.php @@ -86,7 +86,7 @@ class EmailValidator return false; } - $dns = false; + $dns = true; if ($checkDNS) { $dns = $this->checkDNS(); }