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 |
State ⇒ Assigned
Version ⇒ Git master
State ⇒ Feedback
file. After I apply the suggested fix in comment
#1, the importsucceeds.
Milestone ⇒ 4.0.1
Assigned to Jan Schneider
pear list -c horde |grep kro
kronolith 4.0.0RC1 beta
State ⇒ Feedback
Priority ⇒ 2. Medium
State ⇒ Unconfirmed
New Attachment: sprechstunde.ics.gz
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
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);
}
}