From e4e4e1ab0ebfe0670f3d5e7c4d181c3e9ef3d2bd Mon Sep 17 00:00:00 2001 From: Johannes Date: Tue, 14 Nov 2023 09:56:02 +0100 Subject: [PATCH] [BUGFIX] check if all sorting parts are present before access fixes #3874 --- Classes/Domain/Search/SearchRequest.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Classes/Domain/Search/SearchRequest.php b/Classes/Domain/Search/SearchRequest.php index 1aa8e69bfa..ed4de77905 100644 --- a/Classes/Domain/Search/SearchRequest.php +++ b/Classes/Domain/Search/SearchRequest.php @@ -275,7 +275,9 @@ public function getSeperatedSortings(): array foreach ($explodedSortings as $sorting) { $sortingSeperated = explode(' ', $sorting); - $parsedSortings[$sortingSeperated[0]] = $sortingSeperated[1]; + if (count($sortingSeperated) === 2) { + $parsedSortings[$sortingSeperated[0]] = $sortingSeperated[1]; + } } return $parsedSortings;