version 1.6.0RC3

If you set the database adapter to return data as an array of objects and
then try to populate a form with a database result it will throw an error:

$db->setFetchMode(Zend_Db::FETCH_OBJ); // set fetch mode
$result = $db->fetchRow('...'); // get result
$form->populate($result); // populate

Catchable fatal error: Argument 1 passed to Zend_Form::populate() must be an
array, object given, ...

whereas, if you don't set the fetch mode to return objects it's fine. 

I guess my question is, should the form be able to accept an array of
objects?
-- 
View this message in context: 
http://www.nabble.com/Should-Zend_Form%3A%3Apopulate%28%29-accept-%24db-%3EsetFetchMode%28Zend_Db%3A%3AFETCH_OBJ%29-result--tp19256956p19256956.html
Sent from the Zend Framework mailing list archive at Nabble.com.

Reply via email to