Skip to content

Commit 0b1b4b4

Browse files
authored
Merge pull request #848 from utopia-php/fix/mongo-order-case
2 parents 2955d60 + 9a395a1 commit 0b1b4b4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Database/Adapter/Mongo.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2914,7 +2914,7 @@ protected function getQueryValue(string $method, mixed $value): mixed
29142914
*/
29152915
protected function getOrder(string $order): int
29162916
{
2917-
return match ($order) {
2917+
return match (\strtoupper($order)) {
29182918
Database::ORDER_ASC => 1,
29192919
Database::ORDER_DESC => -1,
29202920
default => throw new DatabaseException('Unknown sort order:' . $order . '. Must be one of ' . Database::ORDER_ASC . ', ' . Database::ORDER_DESC),

0 commit comments

Comments
 (0)