Issues

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

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

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.