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 Feb 5, 2024
1 parent 0d1ebe6 commit cc46246
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 cc46246

Please sign in to comment.