diff --git a/api/app/Http/Controllers/ProgramController.php b/api/app/Http/Controllers/ProgramController.php
index d561525..bd667f0 100644
--- a/api/app/Http/Controllers/ProgramController.php
+++ b/api/app/Http/Controllers/ProgramController.php
@@ -106,7 +106,9 @@ QUERY;
}
// Only use this item if it is valid
- if(($item[2]->startdate == null || $item[2]->startdate <= $activeProgramStart) && ($item[2]->enddate == null || $item[2]->enddate > $activeProgramStart))
+ // MS 2018-01-12: Don't know why I originally had this, the list should only contain valid items.
+ // This crashed the site once because it skipped a program that should have been in the list but generated 'program not active at priorty' message later on.
+ // if(($item[2]->startdate == null || $item[2]->startdate <= $activeProgramStart) && ($item[2]->enddate == null || $item[2]->enddate > $activeProgramStart))
{
if($DEBUG) print "{$item[1]->format('d-m-Y H:i')}: {$item[2]->name} {$item[2]->suffix} " . ($item[0] == $START ? "begint" : "eindigt") . "
";
@@ -161,10 +163,11 @@ QUERY;
} else {
return response()->abort(500, "Invalid item type: expected START ($START) or END ($END), but got {$item[0]}.");
}
- } else if($DEBUG) {
- print "Skipped {$item[2]->name} {$item[2]->suffix} on {$item[1]->format('d-m-Y H:i')} "
- . " because startdate is " . ($item[2]->startdate == null ? "[null]" : $item[2]->startdate->format('d-m-Y H:i'))
- . " and end date is " . ($item[2]->enddate == null ? "[null]" : $item[2]->enddate->format('d-m-Y H:i')) . "
";
+ //} else if($DEBUG) {
+ // print "Skipped {$item[2]->name} {$item[2]->suffix} on {$item[1]->format('d-m-Y H:i')}
"
+ // . " because startdate is " . ($item[2]->startdate == null ? "[null]" : $item[2]->startdate->format('d-m-Y H:i')) . "
"
+ // . " and end date is " . ($item[2]->enddate == null ? "[null]" : $item[2]->enddate->format('d-m-Y H:i')) . "
"
+ // . " Active program " . ($activeProgram ? $activeProgram->name : '[null]') . " starts at " . $activeProgramStart->format('c') . "
";
}
// The item will recur in a week