Issues

ZF-9080: Zend_Validate_EmailAddress invalid call to $this->_binaryToIp()

Description

Problem: When performing MX and Deep validation I receive the following error "Fatal error: Call to undefined method Zend_Validate_EmailAddress::_binaryToIp()".

Problem Source: Lines 365 and 366 call a method called $this->_binaryToIp() however, this method doesn't exist. A method called _toIp() does exist and based on the method description it indicates a binary string to an IP address conversion takes place.

Reproducing: Trying to validate "asdf@asdasdasd.com" with the following form element reproduces the error.

    $this->addElement(
        'text', 'email', array(
            'label' => 'Your Email Address',
            'required' => true,
            'filters' => array('StringTrim'),
            'validators' => array(
                array('EmailAddress', true, array(
                    'mx' => true,
                    'deep' => true
                ))
            )
        )
    );

Verify Problem: Performing a grep on the Zend library indicates a method called $this->_binaryToIp does not exist. It looks like the problem was introduced in revision 18050.

Correction: Replacing $this->_binaryToIp to $this->_toIp corrected the problem.

Comments

Fixed with r20910