From: gustav_delius Date: Wed, 9 Jun 2004 08:36:28 +0000 (+0000) Subject: fixed bug 1553 which gave error with empty jump menu X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=6f9f3b693fe08914570a3c6540f8f2b836ed17af;p=moodle.git fixed bug 1553 which gave error with empty jump menu --- diff --git a/lib/weblib.php b/lib/weblib.php index 0effc063f9..a07e6079bf 100644 --- a/lib/weblib.php +++ b/lib/weblib.php @@ -441,6 +441,10 @@ function popup_form ($common, $options, $formname, $selected="", $nothing="choos // global $CFG; + + if (empty($options)) { + return ''; + } if ($nothing == "choose") { $nothing = get_string("choose")."..."; @@ -1821,6 +1825,7 @@ function navmenu($course, $cm=NULL, $targetwindow="self") { $selectmod = NULL; $logslink = NULL; $flag = false; + $menu = array(); $sectionrecs = get_records("course_sections","course","$course->id","section","section,visible");