Skip to content

Commit

Permalink
[BUGFIX] check if all sorting parts are present before access
Browse files Browse the repository at this point in the history
  • Loading branch information
schugabe authored Nov 14, 2023
1 parent b3d5cb7 commit e4e4e1a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Classes/Domain/Search/SearchRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit e4e4e1a

Please sign in to comment.