From ed1f7aca93559efcd49859349fd7d3081bc4af58 Mon Sep 17 00:00:00 2001 From: sopel Date: Wed, 20 Sep 2006 12:29:05 +0000 Subject: [PATCH] MX checking disabled by default --- Doctrine/Validator/Email.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Doctrine/Validator/Email.php b/Doctrine/Validator/Email.php index fc4423f65..29c3a097a 100644 --- a/Doctrine/Validator/Email.php +++ b/Doctrine/Validator/Email.php @@ -14,10 +14,12 @@ class Doctrine_Validator_Email { if(empty($value)) return true; - $parts = explode("@", $value); - if(isset($parts[1]) && function_exists("checkdnsrr")) { - if( ! checkdnsrr($parts[1], "MX")) - return false; + if(isset($args[0])) { + $parts = explode("@", $value); + if(isset($parts[1]) && function_exists("checkdnsrr")) { + if( ! checkdnsrr($parts[1], "MX")) + return false; + } } $qtext = '[^\\x0d\\x22\\x5c\\x80-\\xff]';