mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-06-26 08:16:44 +03:00
Also prevent error for #1733
This commit is contained in:
parent
e0236ea52d
commit
18452cc53c
1 changed files with 6 additions and 1 deletions
|
|
@ -749,9 +749,14 @@ class MailClient
|
|||
*/
|
||||
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);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue