Topic: Bug in function "calcFTDate" of displays
Hi,
think there is something wrong in the "calcFTDate" function of the displays 1 to 3.
Found this, because of setting "First Day Of Week" to "1". But this did not work within the display files. So I tried to figure this out:
First: A PHP error is shown when using "WEEK" for from or till date
Notice: Undefined variable: set in /volume1/web/lc521ff090/display3.php on line 151 Notice: Trying to access array offset on value of type null in /volume1/web/lc521ff090/display3.php on line 151
To fix this the function should have the $set variable as global:
global $futEvts, $set;
Second: wrong brackets within in the function under "case: 'WEEK' "
Instead of
$dStamp = time() + ($set['weekStart'] + $wkDay * 86400) + ($mult * 604800); //time first day
it should be
$dStamp = time() + (($set['weekStart'] + $wkDay) * 86400) + ($mult * 604800); //time first day