fix <select> value setting
This commit is contained in:
@@ -462,10 +462,11 @@ class FormDisplay
|
|||||||
private function _validateSelect(&$value, array $allowed)
|
private function _validateSelect(&$value, array $allowed)
|
||||||
{
|
{
|
||||||
foreach ($allowed as $vk => $v) {
|
foreach ($allowed as $vk => $v) {
|
||||||
if ($value == $vk) {
|
// force string comparison so that 0 isn't equal to any string
|
||||||
settype($value, gettype($v));
|
if ((string)$value == (string)$vk) {
|
||||||
return true;
|
settype($value, gettype($v));
|
||||||
}
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user