Browse Source

cast month and day to prevent white screens on My reservation tab using php8

4.0.x-roblib
ppound 2 years ago
parent
commit
e4eeea33b3
  1. 2
      reserve.inc

2
reserve.inc

@ -1091,7 +1091,7 @@ function reserve_which_year($month, $day) {
// determine if this year or next year // determine if this year or next year
$yearnow = date('Y'); $yearnow = date('Y');
$absdaynow = date('z'); $absdaynow = date('z');
$absdaydefault = date('z', mktime(0, 0, 0, $month, $day, $yearnow)); $absdaydefault = date('z', mktime(0, 0, 0, (int)$month, (int)$day, $yearnow));
if ($absdaynow > $absdaydefault) { if ($absdaynow > $absdaydefault) {
$year = $yearnow + 1; $year = $yearnow + 1;
} }

Loading…
Cancel
Save