MDL-48430 custom_menu: Malformed url in custom menu cannot break the platform
This commit is contained in:
committed by
Eloy Lafuente (stronk7)
parent
80154bd033
commit
4656c6ab53
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user