6.0.0-beta1
8/11/25

[#11587] PHP Fatal error: Call to a member function setTimezone() on a non-object in /var/www/horde5/kronolith/lib/Kronolith.php on line 407
Summary PHP Fatal error: Call to a member function setTimezone() on a non-object in /var/www/horde5/kronolith/lib/Kronolith.php on line 407
Queue Kronolith
Queue Version Git master
Type Bug
State Resolved
Priority 2. Medium
Owners jan (at) horde (dot) org
Requester vm08823817073160362v (at) vmail (dot) inf (dot) h-brs (dot) de
Created 10/29/2012 (4669 days ago)
Due
Updated 12/06/2012 (4631 days ago)
Assigned 12/06/2012 (4631 days ago)
Resolved 12/06/2012 (4631 days ago)
Github Issue Link
Github Pull Request
Milestone 4.0.1
Patch Yes

History
12/06/2012 04:24:10 PM Jan Schneider State ⇒ Resolved
 
12/06/2012 03:16:11 PM Jan Schneider Comment #6
State ⇒ Assigned
Reply to this comment
Nevermind.
12/06/2012 03:15:29 PM Jan Schneider Comment #5
Version ⇒ Git master
State ⇒ Feedback
Reply to this comment
That example ICS files works perfectly here.
12/06/2012 01:14:52 PM horde (dot) wayne (at) ptaff (dot) ca Comment #4 Reply to this comment
I can reproduce the problem with kronolith-4.0.2 with a complex .ics 
file. After I apply the suggested fix in comment #1, the import 
succeeds.
10/29/2012 04:29:25 PM Jan Schneider State ⇒ Assigned
Milestone ⇒ 4.0.1
Assigned to Jan Schneider
 
10/29/2012 04:28:50 PM Jan Schneider Version ⇒ 4.0.0RC1
 
10/29/2012 03:41:55 PM vm08823817073160362v (at) vmail (dot) inf (dot) h-brs (dot) de Comment #3 Reply to this comment
Are you really using the develop branch?
er, no. It's in PEAR's Beta2 and RC1.

pear list -c horde |grep kro

kronolith                  4.0.0RC1   beta

10/29/2012 03:32:32 PM Jan Schneider Comment #2
State ⇒ Feedback
Priority ⇒ 2. Medium
Reply to this comment
Are you really using the develop branch?
10/29/2012 02:00:14 PM vm08823817073160362v (at) vmail (dot) inf (dot) h-brs (dot) de Comment #1
State ⇒ Unconfirmed
New Attachment: sprechstunde.ics.gz Download
Patch ⇒ Yes
Milestone ⇒
Priority ⇒ 3. High
Type ⇒ Bug
Summary ⇒ PHP Fatal error: Call to a member function setTimezone() on a non-object in /var/www/horde5/kronolith/lib/Kronolith.php on line 407
Queue ⇒ Kronolith
Reply to this comment
This error pops up in syslog when an ics-file is imported. The event 
is the first "complicated" looking one in the file. Attached you'll 
find the event, that triggered the error.

If I look around 407, the loop suggests that $next is to become false 
eventually, but the 2nd if($convert) ignores that. As workaround I 
have added a && $next !== false to it. That seems to work.

             while ($next !== false && $next->compareDate($endDate) <= 0) {
                 if (!$event->recurrence->hasException($next->year, 
$next->month, $next->mday)) {
[snip]
                 }
                 if ($convert) {
                     $next->setTimezone($event->timezone);
                 }
                 $next = $event->recurrence->nextRecurrence(
                     array('year' => $next->year,
                           'month' => $next->month,
                           'mday' => $next->mday + 1,
                           'hour' => $next->hour,
                           'min' => $next->min,
                           'sec' => $next->sec));
                 if ($convert && $next !== false) {
#line 407:
                     $next->setTimezone($timezone);
                 }
             }

Saved Queries