diff options
Diffstat (limited to 'it_html.class')
-rw-r--r-- | it_html.class | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/it_html.class b/it_html.class index 4f1e837..9008b3e 100644 --- a/it_html.class +++ b/it_html.class @@ -354,11 +354,11 @@ function select($tags, $options, $selected = null) { $grouphtml = ""; foreach($option as $optval => $opt) - $grouphtml .= $this->_tag("option", array(array('value' => $optval, 'selected' => in_array($optval, $selected)), Q($opt))); + $grouphtml .= $this->_tag("option", array(array('value' => $optval, 'selected' => in_array((string)$optval, $selected)), Q($opt))); $html .= $this->_tag("optgroup", array(array('label' => $value, $grouphtml))); } else - $html .= $this->_tag("option", array(array('value' => $value, 'selected' => in_array($value, $selected), 'disabled' => $option === ""), (trim($option) === "") ? " " : Q($option))); + $html .= $this->_tag("option", array(array('value' => $value, 'selected' => in_array((string)$value, $selected), 'disabled' => $option === ""), (trim($option) === "") ? " " : Q($option))); } return $this->_tag("select", array($tags, $html)); |