Skip to content

Commit a874716

Browse files
committed
Throw an exception if the string sort key is incorrect
1 parent 9399dc3 commit a874716

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/QueriesMessages.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,7 @@ public function newest(): MessageQueryInterface
392392
public function setSortKey(ImapSortKey|string|null $key): MessageQueryInterface
393393
{
394394
if (is_string($key)) {
395-
$key = ImapSortKey::tryFrom(strtoupper($key));
395+
$key = ImapSortKey::from(strtoupper($key));
396396
}
397397

398398
$this->sortKey = $key;

0 commit comments

Comments
 (0)