Browse Source

[ZF-9389] Zend_Validate:

- change mx message

git-svn-id: http://framework.zend.com/svn/framework/standard/trunk@21460 44c647ce-9c0f-0410-b52a-842ac1e357ba
thomas 16 years ago
parent
commit
fc10b06a7b
1 changed files with 3 additions and 1 deletions
  1. 3 1
      library/Zend/Validate/EmailAddress.php

+ 3 - 1
library/Zend/Validate/EmailAddress.php

@@ -443,7 +443,9 @@ class Zend_Validate_EmailAddress extends Zend_Validate_Abstract
     {
         $mxHosts = array();
         $result = getmxrr($this->_hostname, $mxHosts);
-        if ($result && $this->_options['deep'] && function_exists('checkdnsrr')) {
+        if (!$result) {
+            $this->_error(self::INVALID_MX_RECORD);
+        } else if ($this->_options['deep'] && function_exists('checkdnsrr')) {
             $validAddress = false;
             $reserved     = true;
             foreach ($mxHosts as $hostname) {