ZF-4463: Object of class stdClass could not be converted to string in Zend\Validate\Abstract.php
Description
Passing an object as an argument to isValid method causes "Catchable fatal error" fired in Zend_Validate_Abstract class on line 205.
Example:
$validateBools = new Zend_Validate_InArray(array( true, false, 'true', 'false', '1', '0', 't', 'f'), true);
var_dump($validateBools->isValid(new stdClass()));
Result: Catchable fatal error: Object of class stdClass could not be converted to string in Zend/Validate/Abstract.php on line 205
Expected Result: bool(false)
Comments
Posted by Thomas Weidner (thomas) on 2008-12-09T07:04:13.000+0000
Fixed with r13114
Posted by Alexander Veremyev (alexander) on 2008-12-16T10:19:54.000+0000
It seems it's not actually an issue.
stdClass objects can't be converted to strings. Try:
Fix causes another problem - [ZF-5232].
Posted by Alexander Veremyev (alexander) on 2008-12-18T07:28:10.000+0000
Fixed