From d21509c7a6cdb64b27462f6d88de00e2bd363a1a Mon Sep 17 00:00:00 2001 From: Denny Lubitz Date: Thu, 16 Jan 2025 15:53:25 +0100 Subject: [PATCH] BUGFIX: Check for workspace --- Neos.Media.Browser/Classes/Controller/UsageController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Neos.Media.Browser/Classes/Controller/UsageController.php b/Neos.Media.Browser/Classes/Controller/UsageController.php index b7aa945742..e1ff71bd6a 100644 --- a/Neos.Media.Browser/Classes/Controller/UsageController.php +++ b/Neos.Media.Browser/Classes/Controller/UsageController.php @@ -128,7 +128,7 @@ public function relatedNodesAction(AssetInterface $asset) $workspacePermissions = $this->contentRepositoryAuthorizationService->getWorkspacePermissions($currentContentRepositoryId, $usage->getWorkspaceName(), $this->securityContext->getRoles(), $this->userService->getBackendUser()?->getId()); $workspace = $contentRepository->findWorkspaceByName($usage->getWorkspaceName()); - $inaccessibleRelation['label'] = $this->getLabelForInaccessibleWorkspace($workspace); + $inaccessibleRelation['label'] = $workspace && $this->getLabelForInaccessibleWorkspace($workspace); $inaccessibleRelation['nodeIdentifier'] = $usage->getNodeAggregateId()->value; $inaccessibleRelation['workspaceName'] = $usage->getWorkspaceName()->value; $inaccessibleRelation['workspace'] = $workspace;