summaryrefslogtreecommitdiff
path: root/plugins/libcalendaring/libcalendaring.php
diff options
context:
space:
mode:
authorAleksander Machniak <machniak@kolabsys.com>2013-09-03 11:06:26 (GMT)
committerAleksander Machniak <machniak@kolabsys.com>2013-09-03 11:06:26 (GMT)
commitea949c79923dbb975b12da0dea0c7f899354e78b (patch)
tree55ed89e889dd22fdb991d0ee67e1953652fbe138 /plugins/libcalendaring/libcalendaring.php
parent9f8c4d547eb573dc3f708d7967e2357e63123dc9 (diff)
downloadroundcubemail-plugins-kolab-ea949c79923dbb975b12da0dea0c7f899354e78b.tar.gz
Fix "PHP Fatal error: Call to a member function setTimezone() on a
non-object" when parsing occurences of recurring events, where 'changed' date is not set (Bug #2185)
Diffstat (limited to 'plugins/libcalendaring/libcalendaring.php')
-rw-r--r--plugins/libcalendaring/libcalendaring.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/plugins/libcalendaring/libcalendaring.php b/plugins/libcalendaring/libcalendaring.php
index 31b731d..608a527 100644
--- a/plugins/libcalendaring/libcalendaring.php
+++ b/plugins/libcalendaring/libcalendaring.php
@@ -120,7 +120,10 @@ class libcalendaring extends rcube_plugin
else if (is_string($dt))
$dt = new DateTime($dt);
- $dt->setTimezone($this->timezone);
+ if ($dt instanceof DateTime) {
+ $dt->setTimezone($this->timezone);
+ }
+
return $dt;
}