fix(SearchProvider): Handle url being null

fixes #2092

Signed-off-by: Marcel Klehr <mklehr@gmx.net>
This commit is contained in:
Marcel Klehr 2023-12-14 13:26:05 +01:00
parent 82ad937ef3
commit c16c6bfb76
1 changed files with 1 additions and 1 deletions

View File

@ -71,7 +71,7 @@ class Provider implements IProvider {
$results = array_map(function (Bookmark $bookmark) {
$favicon = $this->url->linkToRouteAbsolute('bookmarks.internal_bookmark.get_bookmark_favicon', ['id' => $bookmark->getId()]);
$resourceUrl = $this->url->linkToRouteAbsolute('bookmarks.web_view.indexbookmark', ['bookmark' => $bookmark->getId()]);
return new SearchResultEntry($favicon, $bookmark->getTitle(), $bookmark->getUrl(), $resourceUrl);
return new SearchResultEntry($favicon, $bookmark->getTitle(), $bookmark->getUrl() ?? '', $resourceUrl);
}, $bookmarks);
return SearchResult::paginated($this->getName(), $results, $params->getLimit() + $params->getOffset());