From: Sam Hemelryk Date: Wed, 2 Dec 2009 07:41:01 +0000 (+0000) Subject: outputcomponents MDL-21020 Fixed error if html_select_option text = 0 X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=c7e4c7b785f92db4975f92e030729fcb623c5f5f;p=moodle.git outputcomponents MDL-21020 Fixed error if html_select_option text = 0 --- 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.'); }