Skip to content
Snippets Groups Projects
Commit 4fb7e4cf authored by Jan-Hendrik Willms's avatar Jan-Hendrik Willms Committed by Jan-Hendrik Willms
Browse files

fixes #3544

Closes #3544

Merge request studip/studip!2433
parent c21f5b4d
No related branches found
No related tags found
No related merge requests found
......@@ -111,7 +111,7 @@ class Course_DetailsController extends AuthenticatedController
return false;
}
$modul_start = Semester::find($modul->start)->beginn ?: 0;
$modul_end = Semester::find($modul->end)->ende ?: PHP_INT_MAX;
$modul_end = $modul->end ? Semester::find($modul->end)->ende : PHP_INT_MAX;
return ($modul_start <= $course_end && $modul_end >= $course_start);
});
......
......@@ -57,7 +57,7 @@ abstract class ModuleManagementModelTreeItem extends ModuleManagementModel imple
$types = $types ?: $path;
$trails = [];
$class_name = get_class($this);
$next = $path[array_search($class_name, $path) + 1];
$next = $path[array_search($class_name, $path) + 1] ?? null;
$parents = $this->getParents($next);
foreach ($parents as $parent) {
......
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