[Kolab-devel] [issue2520] an event breaking lib/Horde/Kolab/Freebusy.php

Mike Gabriel kolab-issues at intevation.de
Mon Mar 3 20:15:50 CET 2008

New submission from Mike Gabriel <m.gabriel at das-netzwerkteam.de>:

i have an event that breaks lib/Horde/Kolab/Freebusy.php with the 
following php error in the middle of freebusy/trigger:

Fatal error: Call to a member function timestamp() on a non-object in 
on line 

here is the event that stops fb-cache file generation (i have crossed 
out the location field):

object(Kolab_Event)#57 (8) { ["eventID"]=>  string(32) 
"db0edbbb1d9acf0309ce34506e36e999" ["start"]=>  object(Horde_Date)#58 
(7) { ["year"]=>  int(2008) ["month"]=>  int(1) ["mday"]=>  int(22) 
["hour"]=>  int(7) ["min"]=>  int(0) ["sec"]=>  int(0) 
["_supportedSpecs"]=>  string(21) "%CdDeHImMnRStTyYbBpxX" } ["end"]=>   
object(Horde_Date)#59 (7) { ["year"]=>  int(2008) ["month"]=>  int(1) 
["mday"]=>  int(22) ["hour"]=>  int(8) ["min"]=>  int(0) ["sec"]=>   
int(0) ["_supportedSpecs"]=>  string(21) "%CdDeHImMnRStTyYbBpxX" } 
["title"]=>  string(10) "Pilates PT" ["location"]=>  string(30) 
"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" ["private"]=>  bool(false) 
["status"]=>  int(2) ["recurrence"]=>   
object(Horde_Date_Recurrence)#60 (7) { ["start"]=>   
object(Horde_Date)#61 (7) { ["year"]=>  int(2008) ["month"]=>  int(1) 
["mday"]=>  int(22) ["hour"]=>  int(7) ["min"]=>  int(0) ["sec"]=>   
int(0) ["_supportedSpecs"]=>  string(21) "%CdDeHImMnRStTyYbBpxX" } 
["recurEnd"]=>  NULL ["recurCount"]=>  int(5) ["recurType"]=>  int(2) 
["recurInterval"]=>  int(1) ["recurData"]=>  int(4) ["exceptions"]=>   
array(0) { } } }

when i change some code in Horde_Kolab_Freebusy::listEvents(), the 
fb-generation works, but i feel that my fix is rather a workaround for 
some other culprit:

     function listEvents($startDate = null, $endDate = null)
             /* do recurrence expansion if not keeping anyway */
             if ($event->recurs()) {
                 $next = $event->recurrence->nextRecurrence($startDate);
                 while ($next !== false &&
                                                         $next->mday)) {
                     $next = $event->recurrence->nextRecurrence($next);
+               if ( $next ) {
-> raises error:    $duration = $next->timestamp() - 
    because $next
    is NULL/false
                     $next_end = &new Horde_Date($event->end->timestamp() +
+               }

                 if ($next !== false &&
                     (!(($endDate->compareDateTime($next) < 0) ||
                        ($startDate->compareDateTime($next_end) > 0)))) {
                     $result[] = $event;

         return $result;

the original kolab XML event is attached to this bug ticket.


files: kolab-event.xml
messages: 13859
nosy: mike
priority: minor bug
status: unread
title: an event breaking lib/Horde/Kolab/Freebusy.php
Kolab issue tracker <kolab-issues at intevation.de>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kolab-event.xml
Type: text/xml
Size: 856 bytes
Desc: not available
URL: <http://lists.kolab.org/pipermail/devel/attachments/20080303/dcf79635/attachment.xml>

More information about the devel mailing list