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.
This commit is contained in:
Brian Freytag
2014-08-20 15:05:30 -04:00
parent bb530a1930
commit a96f0822e0
@@ -86,7 +86,7 @@ class EmailValidator
return false;
}
$dns = false;
$dns = true;
if ($checkDNS) {
$dns = $this->checkDNS();
}