Skip to content
This repository has been archived by the owner on Nov 4, 2024. It is now read-only.

Commit

Permalink
Also prevent error for #1733
Browse files Browse the repository at this point in the history
  • Loading branch information
the-djmaze committed Sep 16, 2024
1 parent e0236ea commit 18452cc
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion snappymail/v/0.0.0/app/libraries/MailSo/Mail/MailClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -749,9 +749,14 @@ public function MessageListUnseen(MessageListParams $oParams, FolderInformation
*/
public function MessageList(MessageListParams $oParams) : MessageCollection
{
if (0 > $oParams->iOffset || 0 > $oParams->iLimit || 999 < $oParams->iLimit) {
if (0 > $oParams->iOffset || 0 > $oParams->iLimit) {
throw new \ValueError;
}
if (10 > $oParams->iLimit) {
$oParams->iLimit = 10;
} else if (999 < $oParams->iLimit) {
$oParams->iLimit = 50;
}

$sSearch = \trim($oParams->sSearch);

Expand Down

0 comments on commit 18452cc

Please sign in to comment.