From: Gunnar Wrobel Date: Fri, 26 Feb 2010 21:53:56 +0000 (+0100) Subject: MFB: kolab/issue3656 (Unable to SyncML Calendar / PHP Fatal error compareDateTime()) X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=c9a3af0afd6a2d8b393cfebe2535c2a244006d5d;p=horde.git MFB: kolab/issue3656 (Unable to SyncML Calendar / PHP Fatal error compareDateTime()) --- 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;