Ahh.. that explains the line count issue...
Line 1381 is
Code: Select all
$newdate = mktime (0,0,0,$month,$nday,$year);
which is inside
Code: Select all
function AddDate ( $month, $day, $year, $numdays) {
$nday = $day + $numdays;
$newdate = mktime (0,0,0,$month,$nday,$year);
return getdate($newdate);
}
The AddDate function is invoked many places with calls like
Code: Select all
$ndate = AddDate($mo, $da, $yr, -1);
with the last argument varying (but always numeric).
One entry at line 992 has
Code: Select all
$tdate = AddDate($pmo, $pda, $pyr, 0); // just to get the name of the day
and the arguments come from
Code: Select all
for ($col=0; $col<$columns; $col++) {
$data = $csvarray[$row][$col];
if ($col == 0) {
$pmo = substr($data, 5, 2);
$pda = substr($data, strrpos($data,"-")+1, 2);
$pyr = substr($data, 0, 4);
$tdate = AddDate($pmo, $pda, $pyr, 0); // just to get the name of the day
since the error only comes once (on your system), I suspect it may be the first entry in your CSV that has a different date format than expected.
Try changing
Code: Select all
$tdate = AddDate($pmo, $pda, $pyr, 0); // just to get the name of the day
to
Code: Select all
print "<!-- data='$data' pmo='$pmo' pda='$pda' pyr='$pyr' -->\n";
$tdate = AddDate($pmo, $pda, $pyr, 0); // just to get the name of the day
print "<!-- tdate='$tdate' -->\n";
and it should embed HTML comments in the output that show up with a view-source of the page.