Skip to content

Commit 8f7a4bb

Browse files
committed
Fix Attempt to assign property "custommenuitems" on null error
1 parent 7e7a5d6 commit 8f7a4bb

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

local/mymedia/lib.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,5 +74,7 @@ function local_mymedia_extend_navigation($navigation) {
7474
}
7575

7676
$myMediaStr = "\n$menuHeaderStr|/local/mymedia/mymedia.php";
77-
$CFG->custommenuitems .= $myMediaStr;
77+
if (empty($custommenuitems) && (isset($CFG->custommenuitems) && !empty($CFG->custommenuitems))) {
78+
$CFG->custommenuitems .= $myMediaStr;
79+
}
7880
}

0 commit comments

Comments
 (0)