diff --git a/lib/classes/coursewizardsteps/LVGroupsWizardStep.php b/lib/classes/coursewizardsteps/LVGroupsWizardStep.php index 4dc7b715a79035f87db1897943de245d72e06799..22f11ea6764905d1cc112c85863e157c1562c72b 100644 --- a/lib/classes/coursewizardsteps/LVGroupsWizardStep.php +++ b/lib/classes/coursewizardsteps/LVGroupsWizardStep.php @@ -407,7 +407,11 @@ class LVGroupsWizardStep implements CourseWizardStep } } else { // optional step if study areas step is activated and at least one area is assigned - if (!count($values[__CLASS__]['lvgruppe_selection']['areas'])) { + if ( + !isset($values[__CLASS__]['lvgruppe_selection']['areas']) + || !is_array($values[__CLASS__]['lvgruppe_selection']['areas']) + || count($values[__CLASS__]['lvgruppe_selection']['areas']) === 0 + ) { $ok = false; $errors[] = _('Der Veranstaltung muss mindestens eine Lehrveranstaltungsgruppe zugeordnet sein.'); }