diff --git a/Classes/Controller/ListViewController.php b/Classes/Controller/ListViewController.php index 93cbbae23..66bb47835 100644 --- a/Classes/Controller/ListViewController.php +++ b/Classes/Controller/ListViewController.php @@ -81,7 +81,7 @@ public function mainAction(): void // extract collection(s) from collection parameter $collections = []; - if ($this->searchParams['collection']) { + if (array_key_exists('collection', $this->searchParams)) { foreach(explode(',', $this->searchParams['collection']) as $collectionEntry) { $collections[] = $this->collectionRepository->findByUid((int) $collectionEntry); } diff --git a/Classes/Controller/SearchController.php b/Classes/Controller/SearchController.php index 8923e7436..ae69761d1 100644 --- a/Classes/Controller/SearchController.php +++ b/Classes/Controller/SearchController.php @@ -390,7 +390,7 @@ private function addCollectionsQuery(string $query): string // if collections are given, we prepare the collections query string // extract collections from collection parameter $collections = null; - if ($this->searchParams['collection']) { + if (array_key_exists('collection', $this->searchParams)) { foreach (explode(',', $this->searchParams['collection']) as $collectionEntry) { $collections[] = $this->collectionRepository->findByUid((int) $collectionEntry); }