ZF-9201: Zend_Validate_EmailAddress: 'mx' option is ignored


The 'mx' option of Zend_Validate_EmailAddress is practically ignored. It only has any effect, if 'deep' is set to true. More precisely, the private method '_validateMXRecords' does nothing and always returns true when 'deep' is false. This defect seems to have been introduced with r18050.

Not strictly related and perhaps my understanding of these issues is insufficient, but to me the documented behaviour of 'deep' and the implemented behaviour (again, in '_validateMXRecords') seems to be contradictory.

Lastly, I just noticed that the bug I'm reporting is captured by the unit test Zend_Validate_EmailAddressTest::testMXRecords if only one enables TESTS_ZEND_VALIDATE_ONLINE_ENABLED -- by default the test is skipped.


Patch contains: - Fix to library to correct for failed unit test - Adjusted test email addresses in the test to use different test domains. Including using rfc2606 example domains for the Bad email domains.

Fixed with r21083