ZF-3350: PartialLoop should not cast Traversable objects to arrays

Issue Type: Bug Created: 2008-05-29T05:09:31.000+0000 Last Updated: 2008-07-22T10:03:33.000+0000 Status: Resolved Fix version(s): - 1.5.3 (28/Jul/08)

Reporter: Matthew Weier O'Phinney (matthew) Assignee: Matthew Weier O'Phinney (matthew) Tags: - Zend_View

Related issues: - ZF-3352



Currently, PartialLoop checks to see if $model implements toArray(), and, if so, uses that method to cast to an array. However, this is not always the desired behavior -- in the case of a Zend_Db_Table_Rowset, the developer may want to pass the individual rows as objects to the partial, allowing the ability to call methods on it.

The behavior should be changed; if the object implements Traversable, PartialLoop should simply iterate over it.


Posted by Matthew Weier O'Phinney (matthew) on 2008-07-22T10:03:33.000+0000

Committed to trunk and 1.5 and 1.6 release branches

Have you found an issue?

See the Overview section for more details.


© 2006-2018 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.