Branch 'roundcubemail-plugins-kolab-format2-horde5' - plugins/libkolab

Thomas Brüderli bruederli at kolabsys.com
Thu Mar 28 09:51:23 CET 2013


 plugins/libkolab/lib/kolab_date_recurrence.php |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

New commits:
commit f396dce89150a5d528c0019079a5b9270f1d39ff
Author: Thomas Bruederli <bruederli at kolabsys.com>
Date:   Thu Mar 28 09:25:11 2013 +0100

    Check types before setting timezone

diff --git a/plugins/libkolab/lib/kolab_date_recurrence.php b/plugins/libkolab/lib/kolab_date_recurrence.php
index b33f911..65d9551 100644
--- a/plugins/libkolab/lib/kolab_date_recurrence.php
+++ b/plugins/libkolab/lib/kolab_date_recurrence.php
@@ -44,8 +44,10 @@ class kolab_date_recurrence
         $this->object = $object = $event->to_array();
 
         // shift dates to user's timezone to correctly compute times across DST changes
-        $object['start']->setTimezone(kolab_format::$timezone);
-        $object['end']->setTimezone(kolab_format::$timezone);
+        if (is_object($object['start']))
+            $object['start']->setTimezone(kolab_format::$timezone);
+        if (is_object($object['end']))
+            $object['end']->setTimezone(kolab_format::$timezone);
 
         $this->next = new Horde_Date($object['start'], kolab_format::$timezone->getName());
 





More information about the commits mailing list