Skip to content
Snippets Groups Projects
Commit a095ef7e authored by Jean-Laurent DUZANT's avatar Jean-Laurent DUZANT
Browse files

FIX #19031 TIME 0:10 - Script des notifications périodiques

parent 63fd43ac
No related branches found
No related tags found
No related merge requests found
......@@ -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;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment