From a20c10905815639463c0aa268656e84f6e6be9ce Mon Sep 17 00:00:00 2001 From: moodler Date: Mon, 25 Aug 2003 02:32:20 +0000 Subject: [PATCH] Fixed a bug when displaying menus with a zero in them --- lib/weblib.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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"; } } } -- 2.39.5