From c9a3af0afd6a2d8b393cfebe2535c2a244006d5d Mon Sep 17 00:00:00 2001 From: Gunnar Wrobel Date: Fri, 26 Feb 2010 22:53:56 +0100 Subject: [PATCH] MFB: kolab/issue3656 (Unable to SyncML Calendar / PHP Fatal error compareDateTime()) --- kronolith/lib/Driver/Kolab.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/kronolith/lib/Driver/Kolab.php b/kronolith/lib/Driver/Kolab.php index ecf93cc12..4a9c4ac74 100644 --- a/kronolith/lib/Driver/Kolab.php +++ b/kronolith/lib/Driver/Kolab.php @@ -216,16 +216,22 @@ class Kronolith_Driver_Kolab extends Kronolith_Driver { $result = $this->synchronize(); - if (is_null($startDate)) { + if (empty($startDate)) { $startDate = new Horde_Date(array('mday' => 1, 'month' => 1, 'year' => 0000)); } - if (is_null($endDate)) { + if (empty($endDate)) { $endDate = new Horde_Date(array('mday' => 31, 'month' => 12, 'year' => 9999)); } + if (!is_a($startDate, 'Horde_Date')) { + $startDate = &new Horde_Date($startDate); + } + if (!is_a($endDate, 'Horde_Date')) { + $endDate = &new Horde_Date($endDate); + } $startDate = clone $startDate; $startDate->hour = $startDate->min = $startDate->sec = 0; -- 2.11.0