Skip to content

Commit

Permalink
[BUGFIX] Fix unsafe array access for 'reverse' argument (#1778)
Browse files Browse the repository at this point in the history
The `reverse` ViewHelper argument is not initialized by `AbstractMenuViewHelper` and not by any other MenuViewhelper that is distributed with EXT:vhs.
So most of the times -if not always- `$this->arguments` won't have the `reverse` key and we fall back to `false` which is also the default value of `getRooline()`s 2nd argument.
  • Loading branch information
smichaelsen authored May 13, 2022
1 parent 4ecac02 commit 182c6bf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Classes/ViewHelpers/Menu/AbstractMenuViewHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ public function render()
$menu = $this->parseMenu($pages);
$rootLine = $this->pageService->getRootLine(
$this->arguments['pageUid'],
$this->arguments['reverse'],
$this->arguments['reverse'] ?? false,
$this->arguments['showAccessProtected']
);
$this->cleanupSubmenuVariables();
Expand Down

0 comments on commit 182c6bf

Please sign in to comment.