ZF-2650: Zend_Validate::is() throws an exception with the wrong message

Description

The following code throws an exception with the wrong "Validate class not found from basename 'EmailAddress'" message. This is wrong because the real problem is that MX checking is not available on Windows.


Zend_Validate::is('email@provider.com', 'EmailAddress', array(Zend_Validate_Hostname::ALLOW_DNS, true));

The following code throws an exception with the right message "Internal error: MX checking not available on this system".


$objValidator = new Zend_Validate_EmailAddress(Zend_Validate_Hostname::ALLOW_DNS, true);
$objValidator->isValid('email@provider.com');

This can be fixed by changing


} catch (Zend_Exception $ze) {
    // fallthrough and continue
}

to


} catch (Zend_Exception $ze) {
    // Throw the exception of the specific validation class
    throw $ze;
}

In Validate.php, lines 152 - 155

Comments

Your code is not right... this would import other problems.

Fixed with SVN-8729.