Skip to content
Snippets Groups Projects
Commit b9d0bc1d authored by Elke Kreim's avatar Elke Kreim
Browse files

Prvent array access with empty key

parent 1989a3be
No related branches found
No related tags found
No related merge requests found
......@@ -95,7 +95,11 @@ function local_sembasednav_extend_navigation(global_navigation $navigation)
if ($specialNodesFirst == 1)
add_semester_nodes($specialNodesList, $myCoursesNode);
if (count($mySemesters)) {
$firstSemesterName = $mySemesters[array_key_first($mySemesters)]["name"];
} else {
$firstSemesterName = null;
}
if ($openFirstSemester && !is_null($firstSemesterName)) {
$key = create_node_key($firstSemesterName);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment