Skip to content

Commit

Permalink
Merge pull request FluidTYPO3#632 from bjo3rnf/deferredfix
Browse files Browse the repository at this point in the history
[BUGFIX] Incorrect variable container index
  • Loading branch information
NamelessCoder committed Jul 10, 2014
2 parents c762189 + 660723d commit 5d894d0
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions Classes/ViewHelpers/Page/Menu/DeferredViewHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,28 +50,28 @@ public function initializeArguments() {

/**
* @return string
* @throws Exception
* @throws \Exception
*/
public function render() {
$as = $this->arguments['as'];
if (FALSE === $this->viewHelperVariableContainer->exists('\FluidTYPO3\Vhs\ViewHelpers\Page\Menu\AbstractMenuViewHelper', 'deferredArray')) {
if (FALSE === $this->viewHelperVariableContainer->exists('FluidTYPO3\Vhs\ViewHelpers\Page\Menu\AbstractMenuViewHelper', 'deferredArray')) {
return NULL;
}
if (FALSE === $this->viewHelperVariableContainer->exists('\FluidTYPO3\Vhs\ViewHelpers\Page\Menu\AbstractMenuViewHelper', 'deferredString')) {
if (FALSE === $this->viewHelperVariableContainer->exists('FluidTYPO3\Vhs\ViewHelpers\Page\Menu\AbstractMenuViewHelper', 'deferredString')) {
return NULL;
}
if (NULL === $as) {
$content = $this->viewHelperVariableContainer->get('\FluidTYPO3\Vhs\ViewHelpers\Page\Menu\AbstractMenuViewHelper', 'deferredString');
$content = $this->viewHelperVariableContainer->get('FluidTYPO3\Vhs\ViewHelpers\Page\Menu\AbstractMenuViewHelper', 'deferredString');
$this->unsetDeferredVariableStorage();
return $content;
} elseif (TRUE === empty($as)) {
throw new Exception('An "as" attribute was used but was empty - use a proper string value', 1370096373);
throw new \Exception('An "as" attribute was used but was empty - use a proper string value', 1370096373);
}
if (TRUE === $this->templateVariableContainer->exists($as)) {
$backupVariable = $this->templateVariableContainer->get($as);
$this->templateVariableContainer->remove($as);
}
$this->templateVariableContainer->add($as, $this->viewHelperVariableContainer->get('\FluidTYPO3\Vhs\ViewHelpers\Page\Menu\AbstractMenuViewHelper', 'deferredArray'));
$this->templateVariableContainer->add($as, $this->viewHelperVariableContainer->get('FluidTYPO3\Vhs\ViewHelpers\Page\Menu\AbstractMenuViewHelper', 'deferredArray'));
$this->unsetDeferredVariableStorage();
$content = $this->renderChildren();
$this->templateVariableContainer->remove($as);
Expand Down

0 comments on commit 5d894d0

Please sign in to comment.