From 6c0985dfe9104d53bca05e6dc797b3c50f59183e Mon Sep 17 00:00:00 2001 From: Thomas Bruederli Date: Wed, 21 May 2014 19:49:34 +0200 Subject: [PATCH] Avoid warnings on empty message lists --- plugins/calendar/calendar.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/calendar/calendar.php b/plugins/calendar/calendar.php index 15c81f99..154b0a3b 100644 --- a/plugins/calendar/calendar.php +++ b/plugins/calendar/calendar.php @@ -2110,7 +2110,7 @@ class calendar extends rcube_plugin */ public function mail_messages_list($p) { - if (in_array('attachment', (array)$p['cols'])) { + if (in_array('attachment', (array)$p['cols']) && !empty($p['messages'])) { foreach ($p['messages'] as $i => $header) { $part = new StdClass; $part->mimetype = $header->ctype;