]> git.mjollnir.org Git - moodle.git/commitdiff
Fixed a bug when displaying menus with a zero in them
authormoodler <moodler>
Mon, 25 Aug 2003 02:32:20 +0000 (02:32 +0000)
committermoodler <moodler>
Mon, 25 Aug 2003 02:32:20 +0000 (02:32 +0000)
lib/weblib.php

index 4c9e3a7376aafda9b9b5754fd3f73ad9932b15a1..235ec988883b22671a8e1dde2813d7cad7179a74 100644 (file)
@@ -310,10 +310,10 @@ function choose_from_menu ($options, $name, $selected="", $nothing="choose", $sc
             if ($value == $selected) {
                 $output .= " selected";
             }
-            if ($label) {
-                $output .= ">$label</option>\n";
-            } else {
+            if ($label === "") {
                 $output .= ">$value</option>\n";
+            } else {
+                $output .= ">$label</option>\n";
             }
         }
     }