Branch 'dev/new-foldernav' - plugins/calendar

Thomas Brüderli bruederli at kolabsys.com
Wed May 21 19:49:43 CEST 2014


 plugins/calendar/calendar.php |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 6c0985dfe9104d53bca05e6dc797b3c50f59183e
Author: Thomas Bruederli <bruederli at kolabsys.com>
Date:   Wed May 21 19:49:34 2014 +0200

    Avoid warnings on empty message lists

diff --git a/plugins/calendar/calendar.php b/plugins/calendar/calendar.php
index 15c81f9..154b0a3 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;




More information about the commits mailing list