Issue Type: Bug Created: 2011-10-07T11:12:41.000+0000 Last Updated: 2011-12-23T00:54:14.000+0000 Status: Resolved Fix version(s): Reporter: mario (mario) Assignee: Ralph Schindler (ralph) Tags: - Zend\View
Related issues: Attachments:
Page is setup layout ->render('header.phtml') ->content ->render('footer.phtml')
content ->partial('table.phtml, $data)
When this renders view assigned variables will no longer be available in header.phtml or anywhere else, removing the call to partial will keep everything in tact. Further removing $view->vars()->clear(); from Zend\View\Helper\Partial will keep everything in tact. Obviously it's supposed to remove the variables from the cloned view and only give access to the passed variables, however it appears like it clears also the variables in the view object it originally cloned.
Posted by mario (mario) on 2011-10-07T11:21:24.000+0000
Replacing $view->vars()->clear(); with $view->setVars(new \Zend\View\Variables()); seems to work as expected.
Posted by Michiel Staessen (mstaessen) on 2011-12-22T22:03:16.000+0000
Whe had this issue and sent this PR for it (https://github.com/zendframework/zf2/pull/577).
This issue is probably already fixed.
Posted by Evan Coury (evan.pro) on 2011-12-23T00:54:14.000+0000
Confirmed that this has been resolved.
Have you found an issue?
See the Overview section for more details.