Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

When displaying navigations three times last navigation has data of prev... #4140

Closed
wants to merge 1 commit into from

3 participants

@spalax

When displaying navigations three times last navigation has data of previous displayed navigation.

@vnagara

I was waiting such fix. Thank.

@ghost Unknown referenced this pull request from a commit
@weierophinney weierophinney Merge branch 'hotfix/4140'
Close #4140
b894340
@ghost Unknown referenced this pull request from a commit
@weierophinney weierophinney Merge branch 'hotfix/4140' into develop
Forward port #4140
2ab9974
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Mar 28, 2013
  1. @spalax
This page is out of date. Refresh to see the latest.
View
4 library/Zend/View/Helper/Navigation.php
@@ -190,6 +190,10 @@ public function findHelper($proxy, $strict = true)
$helper->setContainer();
$this->inject($helper);
$this->injected[$hash] = true;
+ } else {
+ if ($this->getInjectContainer()) {
+ $helper->setContainer($container);
+ }
}
return $helper;
View
9 tests/ZendTest/View/Helper/Navigation/NavigationTest.php
@@ -132,6 +132,15 @@ public function testDisablingContainerInjection()
$this->assertEquals($expected, $actual);
}
+ public function testMultipleNavigationsAndOneMenuDisplayedTwoTimes()
+ {
+ $expected = $this->_helper->setContainer($this->_nav1)->menu()->getContainer();
+ $this->_helper->setContainer($this->_nav2)->menu()->getContainer();
+ $actual = $this->_helper->setContainer($this->_nav1)->menu()->getContainer();
+
+ $this->assertEquals($expected, $actual);
+ }
+
public function testServiceManagerIsUsedToRetrieveContainer()
{
$container = new Container;
Something went wrong with that request. Please try again.