Merge branch 'MDL-48430_master' of https://github.com/crazyserver/moodle
authorSam Hemelryk <sam@moodle.com>
Wed, 10 Dec 2014 02:29:06 +0000 (15:29 +1300)
committerEloy Lafuente (stronk7) <stronk7@moodle.org>
Wed, 10 Dec 2014 12:24:38 +0000 (13:24 +0100)
lib/outputcomponents.php

index 3a2e70a..661f1f2 100644 (file)
@@ -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;