Zend_Form constructor does warn about using objects in the constructor

Maybe it will save somebody an hour research.
The error, actually a warning:


htmlspecialchars() expects parameter 1 to be string, object given in /var/www/myproject/library/Zend/View/Abstract.php on line 897


// species is a Zend_Db_Table_Rowset
// this will warn
$form = new My_Form(array('species' => $species));
// this will go ok
$form = new My_Form(array('species' => $species->toArray()));
// if this is generating further rendering problems you'll have to create a simple array with only key value pairs. :(


About this entry