form: select field : allow the provided value to be an integer and work correctely in comparison with the string defaults values

git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@4005 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
This commit is contained in:
2017-12-01 08:36:01 +00:00
parent a80a51c862
commit 8495ce241b

View File

@@ -790,6 +790,10 @@ class formfield
is_string ($this->values) &&
$this->values == $key)
$res .= " selected='selected'";
elseif (isset ($this->values) &&
is_integer ($this->values) &&
$this->values == $key)
$res .= " selected='selected'";
elseif (isset ($this->values) &&
is_array ($this->values) &&
in_array ($key, $this->values))