mirror of
https://gitlab.easter-eggs.com/ee/ldapsaisie.git
synced 2024-11-18 16:19:06 +01:00
LSformElement_select : fix bug when possible_values params is unset or empty
This commit is contained in:
parent
6ec5efb04d
commit
b3791b28ec
1 changed files with 8 additions and 2 deletions
|
@ -72,8 +72,14 @@ class LSformElement_select extends LSformElement {
|
||||||
* @retval string or False The value's label or False if this value is incorrect
|
* @retval string or False The value's label or False if this value is incorrect
|
||||||
*/
|
*/
|
||||||
public function isValidValue($value,$possible_values=False) {
|
public function isValidValue($value,$possible_values=False) {
|
||||||
if (!$possible_values)
|
if (!is_array($possible_values)) {
|
||||||
$possible_values=$this -> params['text_possible_values'];
|
if (isset($this) && get_class($this) == __CLASS__ && is_array($this -> params['text_possible_values'])) {
|
||||||
|
$possible_values=$this -> params['text_possible_values'];
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
return False;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$ret=False;
|
$ret=False;
|
||||||
if (is_array($possible_values) && isset($value)) {
|
if (is_array($possible_values) && isset($value)) {
|
||||||
|
|
Loading…
Reference in a new issue