Skip to content

Commit

Permalink
fix(QueryBuilderAdapter): normalize sort direction by uppercasing it
Browse files Browse the repository at this point in the history
  • Loading branch information
priyadi committed Mar 31, 2024
1 parent d7c416e commit a83ba1e
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,7 @@ private function getSortOrder(): array
$exploded = explode(' ', $part);
$field = $exploded[0];
$direction = $exploded[1] ?? 'ASC';
$direction = strtoupper($direction);

if (!\in_array($direction, ['ASC', 'DESC'], true)) {
throw new \LogicException('Invalid direction');
Expand Down

0 comments on commit a83ba1e

Please sign in to comment.