mirror of
https://github.com/the-djmaze/snappymail.git
synced 2024-09-20 07:35:55 +08:00
Also prevent error for #1733
This commit is contained in:
parent
e0236ea52d
commit
18452cc53c
|
@ -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…
Reference in a new issue