Skip to content

Commit

Permalink
[BUGFIX] Check if array is not null before checking for the existence…
Browse files Browse the repository at this point in the history
… of the key (#1322)

Co-authored-by: Sebastian Meyer <[email protected]>
  • Loading branch information
beatrycze-volk and sebastian-meyer committed Sep 20, 2024
1 parent 2ad780b commit a156360
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Classes/Controller/ListViewController.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public function mainAction(): void

// extract collection(s) from collection parameter
$collections = [];
if (array_key_exists('collection', $this->searchParams)) {
if (is_array($this->searchParams) && array_key_exists('collection', $this->searchParams)) {
foreach(explode(',', $this->searchParams['collection']) as $collectionEntry) {
$collections[] = $this->collectionRepository->findByUid((int) $collectionEntry);
}
Expand Down

0 comments on commit a156360

Please sign in to comment.