plugins/libcalendaring

Thomas Brüderli bruederli at kolabsys.com
Thu Oct 9 19:07:49 CEST 2014


 plugins/libcalendaring/libvcalendar.php |    8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

New commits:
commit 449d4ad81b6f65a60264f9b5749462ca1480928b
Author: Thomas Bruederli <bruederli at kolabsys.com>
Date:   Thu Oct 9 18:58:46 2014 +0200

    Filter empty recurrence attributes

diff --git a/plugins/libcalendaring/libvcalendar.php b/plugins/libcalendaring/libvcalendar.php
index bdf8dea..c80565d 100644
--- a/plugins/libcalendaring/libvcalendar.php
+++ b/plugins/libcalendaring/libvcalendar.php
@@ -436,15 +436,17 @@ class libvcalendar implements Iterator
                 if (!$params['INTERVAL'])
                     $params['INTERVAL'] = 1;
 
-                $event['recurrence'] = $params;
+                $event['recurrence'] = array_filter($params);
                 break;
 
             case 'EXDATE':
-                $event['recurrence']['EXDATE'] = array_merge((array)$event['recurrence']['EXDATE'], self::convert_datetime($prop, true));
+                if (!empty($prop->value))
+                    $event['recurrence']['EXDATE'] = array_merge((array)$event['recurrence']['EXDATE'], self::convert_datetime($prop, true));
                 break;
 
             case 'RDATE':
-                $event['recurrence']['RDATE'] = array_merge((array)$event['recurrence']['RDATE'], self::convert_datetime($prop, true));
+                if (!empty($prop->value))
+                    $event['recurrence']['RDATE'] = array_merge((array)$event['recurrence']['RDATE'], self::convert_datetime($prop, true));
                 break;
 
             case 'RECURRENCE-ID':




More information about the commits mailing list