1
This patch fixes Bug#530842, which has already been reported upstream [1]. The patch that
2
fixes the problem is really trivial and is already in SVN upstream [2].
4
1: http://sourceforge.net/tracker/index.php?func=detail&aid=2534090&group_id=3870&atid=303870
5
2: http://webcalendar.cvs.sourceforge.net/viewvc/webcalendar/webcalendar/includes/functions.php?r1=1.568&r2=1.569
7
This is the description of the patch:
9
PHP 5.2.8/Seg fault/blank page/Internal Server Error/untimed - ID: 2534090
12
This patch fixes the problem that many people are recently
13
experiencing with WebCalendar 1.2.0 when their servers get
14
upgraded to PHP 5.2.8.
16
The problem manifests as a Segmentation fault / blank pages /
17
Internal Server Error when a user has Untimed Events or events
18
spanning midnight on their calendar.
20
It is caused by a change to the behavior of mktime(), so that
21
it no longer accepts numbers such as 109 as the year 2009.
23
This patch will work with all versions of PHP 4 and 5.
26
kc1 ( kevencook ) - 2009-01-25 00:18
28
-- Rafael Laboissiere <rafael@debian.org> Sat, 06 Jun 2009 11:08:47 +0200
30
--- a/includes/functions.php
31
+++ b/includes/functions.php
35
$midnight = gmmktime ( - ( date ( 'Z', $item->getDateTimeTS () ) / 3600 ),
36
- 0, 0, $lt[4] + 1, $lt[3] + 1, $lt[5] );
37
+ 0, 0, $lt[4] + 1, $lt[3] + 1, 1900 + $lt[5] );
39
$realEndTS = $item->getEndDateTimeTS ();
40
$originalDate = $item->getDate ();