Skip to content

Commit 1e3df24

Browse files
removed default attributes from the OrderException
1 parent c744eff commit 1e3df24

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

src/Database/Adapter/MariaDB.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1717,7 +1717,10 @@ public function find(string $collection, array $queries = [], ?int $limit = 25,
17171717
}
17181718

17191719
if (\is_null($cursor[$originalAttribute] ?? null)) {
1720-
throw new OrderException("Order attribute '{$originalAttribute}' is empty", 0, null, $originalAttribute);
1720+
throw new OrderException(
1721+
message: "Order attribute '{$originalAttribute}' is empty",
1722+
attribute: $originalAttribute
1723+
);
17211724
}
17221725

17231726
$binds[':cursor'] = $cursor[$originalAttribute];

src/Database/Adapter/Postgres.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1550,7 +1550,10 @@ public function find(string $collection, array $queries = [], ?int $limit = 25,
15501550
}
15511551

15521552
if (\is_null($cursor[$originalAttribute] ?? null)) {
1553-
throw new OrderException("Order attribute '{$originalAttribute}' is empty", 0, null, $originalAttribute);
1553+
throw new OrderException(
1554+
message: "Order attribute '{$originalAttribute}' is empty",
1555+
attribute: $originalAttribute
1556+
);
15541557
}
15551558

15561559
$binds[':cursor'] = $cursor[$originalAttribute];

0 commit comments

Comments
 (0)