diff --git a/libraries/config/FormDisplay.class.php b/libraries/config/FormDisplay.class.php index 80f07df85..a176c3bdf 100644 --- a/libraries/config/FormDisplay.class.php +++ b/libraries/config/FormDisplay.class.php @@ -462,10 +462,11 @@ class FormDisplay private function _validateSelect(&$value, array $allowed) { foreach ($allowed as $vk => $v) { - if ($value == $vk) { - settype($value, gettype($v)); - return true; - } + // force string comparison so that 0 isn't equal to any string + if ((string)$value == (string)$vk) { + settype($value, gettype($v)); + return true; + } } return false; }