From 369415b5f5d0bdb028070f178357059e4c7634c1 Mon Sep 17 00:00:00 2001 From: Ludovic Poujol Date: Wed, 27 Mar 2019 11:09:02 +0100 Subject: [PATCH] Ensure SelectFormField behave properly in some edge cases --- evolibs/Form.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/evolibs/Form.php b/evolibs/Form.php index 97b6921..f1cdba9 100644 --- a/evolibs/Form.php +++ b/evolibs/Form.php @@ -879,7 +879,7 @@ class SelectFormField extends FormField { } public function verify($set_error) { - if($this->mandatory && empty($this->value)) { + if($this->mandatory && strlen($this->value) === 0) { if($set_error) $this->error = 'Champ obligatoire'; return FALSE; } @@ -894,7 +894,7 @@ class SelectFormField extends FormField { $input .= ' '."\n"; foreach ($this->list as $value => $label) { $input .= ' '."\n"; } $input .= "\n";