Menu

#6 date problem with PHP 5.1.6

open
nobody
5
2006-10-24
2006-10-24
No

I've just done an initial install of 3.7 Beta and get
the following error in every day of the month when I
click on a particular day:

Warning: date() expects parameter 2 to be long, string
given in C:\xampp\htdocs\ors\monthview.php on line 270

Warning: date() expects parameter 2 to be long, string
given in C:\xampp\htdocs\ors\monthview.php on line 275

I've looked around the net and this seems to be a
common problem with date statements written for PHP 4
that are installed on a PHP 5 server. I don't have the
option to change PHP versions so was wondering if
anyone was smart on the date function and how to fix
it. The relevant lines of code are:

if (date("m/d/Y",$datestamp) ==
date("m/d/Y",$HTTP_POST_VARS['starttime']) &
!in_array($HTTP_POST_VARS['submit'],array("info","Delete","No-Show","edit")))
{
if (date("m/d/Y",$datestamp) !=
date("m/d/Y",$HTTP_POST_VARS['endtime'])) {
echo '&lt;<em><font
size="-1">START</font></em>&gt;';
} else
echo '&lt;<em>START /
END</em>&gt;';
} elseif (date("m/d/Y",$datestamp) ==
date("m/d/Y",$HTTP_POST_VARS['endtime']) &
!in_array($HTTP_POST_VARS['submit'],array("info","Delete","No-Show","edit")))

Discussion


Log in to post a comment.