From: moodler Date: Mon, 25 Aug 2003 02:32:20 +0000 (+0000) Subject: Fixed a bug when displaying menus with a zero in them X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=a20c10905815639463c0aa268656e84f6e6be9ce;p=moodle.git Fixed a bug when displaying menus with a zero in them --- diff --git a/lib/weblib.php b/lib/weblib.php index 4c9e3a7376..235ec98888 100644 --- a/lib/weblib.php +++ b/lib/weblib.php @@ -310,10 +310,10 @@ function choose_from_menu ($options, $name, $selected="", $nothing="choose", $sc if ($value == $selected) { $output .= " selected"; } - if ($label) { - $output .= ">$label\n"; - } else { + if ($label === "") { $output .= ">$value\n"; + } else { + $output .= ">$label\n"; } } }