]> git.mjollnir.org Git - moodle.git/commitdiff
fixed bug 1553 which gave error with empty jump menu
authorgustav_delius <gustav_delius>
Wed, 9 Jun 2004 08:36:28 +0000 (08:36 +0000)
committergustav_delius <gustav_delius>
Wed, 9 Jun 2004 08:36:28 +0000 (08:36 +0000)
lib/weblib.php

index 0effc063f9638ce18d9554525222c39aa4c0d3c5..a07e6079bf58df64b50d41f16315849d146eff07 100644 (file)
@@ -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");