Removed check in program that crashed the site and seems to be unneccesary(?)
This commit is contained in:
@@ -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 "<b>{$item[1]->format('d-m-Y H:i')}: {$item[2]->name} {$item[2]->suffix} " . ($item[0] == $START ? "begint" : "eindigt") . "</b><br/>";
|
||||
|
||||
@@ -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 "<i>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')) . "</i><br/>";
|
||||
//} else if($DEBUG) {
|
||||
// print "<i>Skipped {$item[2]->name} {$item[2]->suffix} on {$item[1]->format('d-m-Y H:i')} <br/>"
|
||||
// . " because startdate is " . ($item[2]->startdate == null ? "[null]" : $item[2]->startdate->format('d-m-Y H:i')) . " <br/>"
|
||||
// . " and end date is " . ($item[2]->enddate == null ? "[null]" : $item[2]->enddate->format('d-m-Y H:i')) . " <br/>"
|
||||
// . " Active program " . ($activeProgram ? $activeProgram->name : '[null]') . " starts at " . $activeProgramStart->format('c') . "</i><br/>";
|
||||
}
|
||||
|
||||
// The item will recur in a week
|
||||
|
||||
Reference in New Issue
Block a user