diff --git a/bin/scheduler.php b/bin/scheduler.php index bce491cbe144e7971d09dd845a9369e01e4a3bd7..23d6dedfc8a5f0f7c93ba6d6f98f63b8df386c6d 100644 --- a/bin/scheduler.php +++ b/bin/scheduler.php @@ -66,19 +66,19 @@ foreach ($schedules as $schedule) { $currentMonth = $currentDate->format('n'); $schedule['months'] = json_decode($schedule['months']); - if (!in_array($currentMonth, $schedule['months']) && $schedule['months'][0] != '*') { + if (!empty($schedule['months']) && !in_array($currentMonth, $schedule['months']) && $schedule['months'][0] != '*') { continue; } $currentDayOfMonth = $currentDate->format('j'); $schedule['days_of_month'] = json_decode($schedule['days_of_month']); - if (!in_array($currentDayOfMonth, $schedule['days_of_month']) && $schedule['days_of_month'][0] != '*') { + if (!empty($schedule['days_of_month']) && !in_array($currentDayOfMonth, $schedule['days_of_month']) && $schedule['days_of_month'][0] != '*') { continue; } $currentDayOfWeek = $currentDate->format('N'); $schedule['days_of_week'] = json_decode($schedule['days_of_week']); - if (!in_array($currentDayOfWeek, $schedule['days_of_week']) && $schedule['days_of_week'][0] != '*') { + if (!empty($schedule['days_of_week']) && !in_array($currentDayOfWeek, $schedule['days_of_week']) && $schedule['days_of_week'][0] != '*') { continue; }