Skip to content

Commit

Permalink
Merge pull request #32 from gradinarufelix/BUGFIX/parent-null-bug
Browse files Browse the repository at this point in the history
BUGFIX: Prevent loop execution on ->getParent() is null
  • Loading branch information
skurfuerst authored Apr 6, 2022
2 parents 2df69ad + 042d7f8 commit 7b05fe1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Classes/Service/DynamicRoleEditorService.php
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ private function generateExpandedNodeIdentifiers(MatcherConfiguration $dynamicRo
$node = $this->getSiteNode()->getContext()->getNodeByIdentifier($nodeIdentifier);
if ($node && $node->getParent() && $node !== $siteNode) {
// the node itself does not need to be expanded, but all parents should be expanded (so that the node which has the restriction is visible in the tree)
while ($node->getParent() !== $siteNode) {
while ($node->getParent() && $node->getParent() !== $siteNode) {
$node = $node->getParent();
$nodeContextPaths[$node->getContextPath()] = $node->getContextPath();
}
Expand Down

0 comments on commit 7b05fe1

Please sign in to comment.