Loading...
 
Skip to main content

mod-events doesn't work with php5

Status
Closed
Subject
mod-events doesn't work with php5
Version
1.9.x
Category
  • Error
  • Less than 30-minutes fix
Feature
Calendar
Resolution status
Fixed or Solved
Submitted by
Xeno
Volunteered to solve
Xeno
Lastmod by
Philippe Cloutier
Rating
(0)
Description

templates/modules/mod-events.tpl uses mktime and under php5 it needs to have all arguments as integers.
Simple patch:

Solution

diff -r1.1.2.2 mod-events.tpl
30c30
< $thedate = mktime(23,59,59,$mon,$day,$year);


> $thedate = mktime(23,59,59,(int)$mon,(int)$day,(int)$year);
151c151
< $tmp = $itemsmktime(0, 0, 0, $mon, $val, $year);


> $tmp = $itemsmktime(0, 0, 0, (int)$mon, (int)$val, (int)$year);
153c153
< unset($itemsmktime(0, 0, 0, $mon, $val, $year));


> unset($itemsmktime(0, 0, 0, (int)$mon, (int)$val, (int)$year));


This was fixed by Sylvie Greverend in r7895.

Importance
6
Easy to solve?
8
Priority
48
Demonstrate Bug on Tiki 19+
Demonstrate Bug (older Tiki versions)
Ticket ID
1022
Created
Wednesday 21 February, 2007 08:59:35 UTC
by Unknown
LastModif
Friday 15 January, 2010 19:20:51 UTC


Show PHP error messages