summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Bruederli <bruederli@kolabsys.com>2014-10-09 16:58:46 (GMT)
committerThomas Bruederli <bruederli@kolabsys.com>2014-10-09 16:58:46 (GMT)
commit90348caf5149eb4a945056cb6a3cb30e7d55be25 (patch)
tree9c3e59b4208805060b1b215e9e58254ddf8481ac
parenteee58ab9ff096288b32b9cfdf688c92bfc77aed6 (diff)
downloadroundcubemail-plugins-kolab-90348caf5149eb4a945056cb6a3cb30e7d55be25.tar.gz
Filter empty recurrence attributes
-rw-r--r--plugins/libcalendaring/libvcalendar.php8
1 files changed, 5 insertions, 3 deletions
diff --git a/plugins/libcalendaring/libvcalendar.php b/plugins/libcalendaring/libvcalendar.php
index bb43388..233213d 100644
--- a/plugins/libcalendaring/libvcalendar.php
+++ b/plugins/libcalendaring/libvcalendar.php
@@ -435,15 +435,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':