diff --git a/includes/pages/user_shifts.php b/includes/pages/user_shifts.php index 3fde65e2..debb9b41 100644 --- a/includes/pages/user_shifts.php +++ b/includes/pages/user_shifts.php @@ -49,7 +49,10 @@ function update_ShiftsFilter_timerange(ShiftsFilter $shiftsFilter, $days) { $start_time = $shiftsFilter->getStartTime(); if (is_null($start_time)) { - $first_day = DateTime::createFromFormat('Y-m-d', $days[0])->getTimestamp(); + $first_day = DateTime::createFromFormat( + 'Y-m-d', + $days[0] ?? (new DateTime())->format('Y-m-d') + )->getTimestamp(); if(time() < $first_day) { $start_time = $first_day; } else {