From c7e4c7b785f92db4975f92e030729fcb623c5f5f Mon Sep 17 00:00:00 2001 From: Sam Hemelryk Date: Wed, 2 Dec 2009 07:41:01 +0000 Subject: [PATCH] outputcomponents MDL-21020 Fixed error if html_select_option text = 0 --- lib/outputcomponents.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/outputcomponents.php b/lib/outputcomponents.php index bc55c49632..f9faada944 100644 --- a/lib/outputcomponents.php +++ b/lib/outputcomponents.php @@ -781,7 +781,7 @@ class html_select_option extends labelled_html_component { * @return void */ public function prepare() { - if (empty($this->text)) { + if (empty($this->text) && (string)$this->text!=='0') { throw new coding_exception('html_select_option requires a $text value.'); } -- 2.39.5