Skip to content
Snippets Groups Projects
Commit 7355e3c9 authored by Jan-Hendrik Willms's avatar Jan-Hendrik Willms
Browse files

prevent php8 warning and fix logic, fixes #4757

Closes #4757

Merge request studip/studip!3547
parent b16c0d28
No related branches found
No related tags found
No related merge requests found
......@@ -159,7 +159,7 @@ class Semester extends SimpleORMap
public static function findAllVisible($with_before_first = true): array
{
return array_values(
array_filter(self::getAllAsArray(), function ($semester, $key) use($with_before_first) {
array_filter(self::getAllAsArray($with_before_first), function ($semester, $key) use($with_before_first) {
return $GLOBALS['perm']->have_perm('admin') || !empty($semester['visible']) || ((int)$key === 0 && $with_before_first);
}, ARRAY_FILTER_USE_BOTH)
);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment