Skip to content

Commit d7b2d33

Browse files
committed
BUGFIX: #3182 betterErrorForGetContextOnNull
1 parent f20108e commit d7b2d33

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Classes/Controller/BackendController.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,9 @@ protected function getSiteNodeForLoggedInUser(): ?NodeInterface
221221
protected function findNodeToEdit(): ?NodeInterface
222222
{
223223
$siteNode = $this->getSiteNodeForLoggedInUser();
224+
if (!$siteNode) {
225+
throw new \RuntimeException('Could not find site node for current user.', 1697707361);
226+
}
224227
$reflectionMethod = new \ReflectionMethod($this->backendRedirectionService, 'getLastVisitedNode');
225228
$reflectionMethod->setAccessible(true);
226229
$node = $reflectionMethod->invoke($this->backendRedirectionService, $siteNode->getContext()->getWorkspaceName());

0 commit comments

Comments
 (0)