Unable to Sync Calendar / PHP Fatal error compareDateTime()

Thomas Nintemann t.nintemann at medial-networks.de
Mon May 25 19:31:04 CEST 2009


Am Monday 25 May 2009 17:33:37 schrieb Carsten Burghardt:
> Zitat von Thomas Nintemann <t.nintemann at medial-networks.de>:
> >> Now I read on the mailing list that it should work. So I checked the
> >> logs for errors that only happen when I sync stuff. And this is the one
> >> I found in the /kolab/var/kolab/www/client/log/php-errors.log
> >>
> >> "PHP Fatal error :  Call to a member function compareDateTime() on a
> >> non- object in
> >> /kolab/var/kolab/www/client/kronolith/lib/Driver/kolab.php on line 1153"
> >
> > Same on my Side with Kolab 2.2.1 native on OpenSUSE-11.1.
> > My Client is a Blackberry 8300 Curve with actual Funambol-Plugin.
> >
> > For stupid test  i comment out the Line 1153 and 1154 as here:
> > /*if (!(($endDate->compareDateTime($event->start) < 0) ||
> >                   ($startDate->compareDateTime($event->end) > 0)))*/
> >
> > and it sync's.
> > But i now this a bad idea.
> >
> > Any better idea's?
>
> Not a real solution but according to the error I'd say that either
> $endDate or $startDate is not defined and not recognized as a date
> object. Maybe a null check should be sufficient?
>
>
> Carsten

OK, thanks for the Tip.

I have now made changes as follow on those lines:

Line 1137 
---------------------------
if (is_null($startDate)) {
----------------------------
to 
----------------------------
if (empty($startDate)) {
-----------------------------

and Line 1140
-----------------------------
if (is_null($endDate)) {
----------------------------
to
-----------------------------
if (empty($endDate)) {
-----------------------------

and now it syncs without my stupid comment out of lines 1153 and 1154.

But i do not now this is the right way to solve that problem.

Thomas

--------------------
Medial-Networks
Thomas Nintemann
Landsbergstraße 45
26871 Papenburg
Phone:+494961916744
Fax: +494961669546
---------------------




More information about the users mailing list