[kronolith] Call to a member function dateString() on null
Ralf Lang
lang at b1-systems.de
Thu Sep 24 10:03:16 UTC 2020
Hallo Ferdinand,
Am 23.09.20 um 19:33 schrieb Ferdinand Gruber:
>
> Am 22.09.20 um 15:07 schrieb Ferdinand Gruber:
>> Today I get an error from kronolith on my server:
>>
>> This message appears every time the Android Davx5 app tries to
>> synchronize.
>>
>> HORDE[19373]: [kronolith] Error: Call to a member function
>> dateString() on null in
>> /srv/www/htdocs/horde/kronolith/lib/Kronolith.php:444
>> Stack trace:
>> #0 /srv/www/htdocs/horde/kronolith/lib/Driver/Sql.php(312):
>> Kronolith::addEvents(Array, Object(Kronolith_Event_Sql), NULL, NULL,
>> false, false, false)
>>
> I made a little change of the code in
> /srv/www/htdocs/horde/kronolith/lib/Kronolith.php at line 444:
>
> This is the hack:
>
> if ( ! is_null($event->start) )
> $results[$event->start->dateString()][$event->id] = $json ?
> $event->toJson() : $event;
>
> I think that an incorrect calendar event was sent by the DAVX5 app. I
> was not able to find out which one it was.
>
> The code above seems to help.
>
> Please give me some feedback.
>
I think you can shorten that to
if ($event->start) {
$results[$event->start->dateString()][$event->id] = $json ?
$event->toJson() : $event;
}
Would you mind sending that as a PR on github? This would facilitate
discussion.
Also, can you give a DB column in kronolith_events for the offending
event? This would enable reproducing.
Thanks a lot!
Ralf
--
Ralf Lang
Linux Consultant / Developer
Tel.: +49-170-6381563
Mail: lang at b1-systems.de
B1 Systems GmbH
Osterfeldstraße 7 / 85088 Vohburg / http://www.b1-systems.de
GF: Ralph Dehner / Unternehmenssitz: Vohburg / AG: Ingolstadt,HRB 3537
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pEpkey.asc
Type: application/pgp-keys
Size: 2688 bytes
Desc: not available
URL: <https://lists.horde.org/archives/kronolith/attachments/20200924/0294865d/attachment.key>
More information about the kronolith
mailing list