Issue Type: Sub-task Created: 2011-12-20T14:13:28.000+0000 Last Updated: 2012-02-26T07:44:59.000+0000 Status: Closed Fix version(s): Reporter: Luís Nunes (luiscnunes) Assignee: Adam Lundrigan (adamlundrigan) Tags: - Zend_Validate
Related issues: Attachments:
Currently Zend_Validate_Hostname does several calls on $this->_options['ip'] - whether set or not, resulting in fatal error "call to a member function on a non-object". In my opinion, a fatal error should always be prevented, so either set a default ip validator or ignore all portions where one would be needed.
The bug described at http://framework.zend.com/issues/browse/ZF-11239 is good enough to replicate the issue.
PHP 5.3.8 Zend Engine v2.3.0
Posted by Adam Lundrigan (adamlundrigan) on 2012-02-26T07:44:59.000+0000
Could not reproduce against trunk.
The ip option will always be set to a valid IP validator. When the Hostname validator is instantiated, the supplied options ($options) are merged with the default set of options ($this->_options) and passed to setOptions. Due to the fact that $this->_options has an ip key defined (as null), setOptions will call setIpValidator and a new instance of Zend_Hostname_Ip will be instantiated.
Have you found an issue?
See the Overview section for more details.