summaryrefslogtreecommitdiff
path: root/it_html.class
diff options
context:
space:
mode:
authorDenis Demesmaeker2007-10-17 09:30:13 +0000
committerDenis Demesmaeker2007-10-17 09:30:13 +0000
commit3f1dbb8bc67b578266ca679e572eca0c90a23876 (patch)
tree6bee6c05ca052aa6fb7ad209ba00c755bb6607ff /it_html.class
parent33b1621c411d9f313771bab8957e5dff109a4dd7 (diff)
downloaditools-3f1dbb8bc67b578266ca679e572eca0c90a23876.tar.gz
itools-3f1dbb8bc67b578266ca679e572eca0c90a23876.tar.bz2
itools-3f1dbb8bc67b578266ca679e572eca0c90a23876.zip
always handle value as string so in_array(7, array(0=>'7fd8611a153c3770f02f13867aefc115') stays false
Diffstat (limited to 'it_html.class')
-rw-r--r--it_html.class4
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));