We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a5c96ab commit 3d23bd6Copy full SHA for 3d23bd6
Imap.php
@@ -266,7 +266,13 @@ public function getMessageIds() {
266
$this->tickle();
267
268
// Fetch overview of mailbox.
269
- $overviews = imap_fetch_overview($this->mailbox, "1:" . imap_num_msg($this->mailbox), 0);
+ $number_messages = imap_num_msg($this->mailbox);
270
+ if ($number_messages) {
271
+ $overviews = imap_fetch_overview($this->mailbox, "1:" . imap_num_msg($this->mailbox), 0);
272
+ }
273
+ else {
274
+ $overviews = array();
275
276
$messageArray = array();
277
278
// Loop through message overviews, build message array.
0 commit comments