From 89fb9dd3e9720cb07d8365deb906a0e3654cce76 Mon Sep 17 00:00:00 2001 From: Thierry Bugier Date: Thu, 23 Jan 2020 14:47:48 +0100 Subject: [PATCH] fix(selectfield): comparison with empty string Signed-off-by: Thierry Bugier --- inc/fields/selectfield.class.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/inc/fields/selectfield.class.php b/inc/fields/selectfield.class.php index 61240b5bc..abc9551eb 100644 --- a/inc/fields/selectfield.class.php +++ b/inc/fields/selectfield.class.php @@ -140,6 +140,10 @@ public function getEmptyParameters() { } public function equals($value) { + if ($value == '') { + // empty string means no selection + $value = '0'; + } return $this->value == $value; }