mirror of
https://github.com/moodle/moodle.git
synced 2025-04-21 00:12:56 +02:00
MDL-48430 custom_menu: Malformed url in custom menu cannot break the platform
This commit is contained in:
parent
d87bcfb325
commit
8e371539f4
@ -2861,7 +2861,11 @@ class custom_menu extends custom_menu_item {
|
||||
$itemtitle = $itemtext;
|
||||
break;
|
||||
case 1:
|
||||
$itemurl = new moodle_url($setting);
|
||||
try {
|
||||
$itemurl = new moodle_url($setting);
|
||||
} catch (Exception $e) {
|
||||
$itemurl = null;
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
$itemtitle = $setting;
|
||||
|
Loading…
x
Reference in New Issue
Block a user