update(LvPlan Feiertage): checks if the query result is array before performing array operations and returns success status instead of raw data

This commit is contained in:
SimonGschnell
2025-07-02 08:55:21 +02:00
parent 34220a8f39
commit bf1dac3fd9
3 changed files with 52 additions and 47 deletions
@@ -119,7 +119,7 @@ class LvPlan extends FHCAPI_Controller
}
$ferienEvents = $this->stundenplanlib->fetchFerienTageEvents($start_date, $end_date, $studiengang);
$ferienEvents = $this->getDataOrTerminateWithError($ferienEvents);
$allEvents = array_merge($lvAndMoodleEvents,$ferienEvents);
// sort array with moodle events first
usort($lvAndMoodleEvents, function($a, $b){