summaryrefslogtreecommitdiff
path: root/plugins/libcalendaring/libcalendaring.php
diff options
context:
space:
mode:
authorThomas Bruederli <bruederli@kolabsys.com>2014-01-08 16:41:38 (GMT)
committerThomas Bruederli <bruederli@kolabsys.com>2014-01-08 16:41:38 (GMT)
commit617277a4f48e5982e9478f2f69e684269267bf9b (patch)
treea3e830f25f5fe69ee1cfb20af3e5cf64f8da727c /plugins/libcalendaring/libcalendaring.php
parent04fe48682ea971d9f4f87aad8f1f86ec21a7b5e0 (diff)
downloadroundcubemail-plugins-kolab-617277a4f48e5982e9478f2f69e684269267bf9b.tar.gz
Avoid fatal errors when no valid date is given for alarms computation
Diffstat (limited to 'plugins/libcalendaring/libcalendaring.php')
-rw-r--r--plugins/libcalendaring/libcalendaring.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/plugins/libcalendaring/libcalendaring.php b/plugins/libcalendaring/libcalendaring.php
index cdae37c..8d287f3 100644
--- a/plugins/libcalendaring/libcalendaring.php
+++ b/plugins/libcalendaring/libcalendaring.php
@@ -404,6 +404,11 @@ class libcalendaring extends rcube_plugin
}
$offset = $notify[0] * $mult;
$refdate = $mult > 0 ? $rec['end'] : $rec['start'];
+
+ // abort of no reference date is available to compute notification time
+ if (!is_a($refdate, 'DateTime'))
+ return null;
+
$notify_at = $refdate->format('U') + $offset;
}
else { // absolute timestamp