ZF-6834: Nested partial loops modify parent partialCounter
Description
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.
{{master.phtml}}:
{{$this->partialLoop('_parent.phtml', $parents);}}
{{_parent.phtml}}:
{{$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.
Comments
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.