Skip to content

Commit

Permalink
Fix Attempt to assign property "custommenuitems" on null error
Browse files Browse the repository at this point in the history
  • Loading branch information
lucaboesch committed Aug 4, 2024
1 parent 7e7a5d6 commit 8f7a4bb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion local/mymedia/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,5 +74,7 @@ function local_mymedia_extend_navigation($navigation) {
}

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

0 comments on commit 8f7a4bb

Please sign in to comment.