From 26655788cb72177b51fc7728095a4a02f2810f44 Mon Sep 17 00:00:00 2001 From: Vidar Langseid Date: Thu, 27 Jun 2024 13:08:00 +0200 Subject: [PATCH] fixup! IBX-6773: Bookmarks for non-accessible contents cause exception --- eZ/Publish/Core/Repository/BookmarkService.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/eZ/Publish/Core/Repository/BookmarkService.php b/eZ/Publish/Core/Repository/BookmarkService.php index 25578367fc..6a6cc9f926 100644 --- a/eZ/Publish/Core/Repository/BookmarkService.php +++ b/eZ/Publish/Core/Repository/BookmarkService.php @@ -10,6 +10,7 @@ use Exception; use eZ\Publish\API\Repository\BookmarkService as BookmarkServiceInterface; +use eZ\Publish\API\Repository\Exceptions\BadStateException; use eZ\Publish\API\Repository\Repository as RepositoryInterface; use eZ\Publish\API\Repository\Values\Bookmark\BookmarkList; use eZ\Publish\API\Repository\Values\Content\Location; @@ -108,7 +109,7 @@ public function loadBookmarks(int $offset = 0, int $limit = 25): BookmarkList ->sliceBy($limit, $offset); $result = $this->repository->getlocationService()->find($filter, []); - } catch (\eZ\Publish\API\Repository\Exceptions\BadStateException $e) { + } catch (BadStateException $e) { return new BookmarkList(); }