ZF-6834: Nested partial loops modify parent partialCounter

Issue Type: Bug Created: 2009-05-28T02:59:20.000+0000 Last Updated: 2012-11-20T20:53:05.000+0000 Status: Closed Fix version(s): Reporter: Olek (olek) Assignee: None Tags: - Zend_View

Related issues: Attachments: - nested_partial_loops.diff


When a partial view file is called from a master view, and itself calls another partial loop, the child partial loop overwrites the parent's partial loop counter.


$this->partialLoop('_parent.phtml', $parents);


$this->partialLoop('_child.phtml', $this->children); $this->partialCounter; // returns count($this->children) + 1 instead of consecutive values for each parent

I have created a patch for this issue - a test case exposing the bug and a solution.


Posted by Olek (olek) on 2009-05-28T03:01:12.000+0000

This patch contains a test, which exposes the bug, and a solution, which makes the test pass.

Posted by Rob Allen (rob) on 2012-11-20T20:53:05.000+0000

Bulk change of all issues last updated before 1st January 2010 as "Won't Fix".

Feel free to re-open and provide a patch if you want to fix this issue.

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.