Skip to content

Commit

Permalink
fix(selectfield): comparison with empty string
Browse files Browse the repository at this point in the history
Signed-off-by: Thierry Bugier <tbugier@teclib.com>
  • Loading branch information
btry committed Jan 23, 2020
1 parent 7480069 commit 89fb9dd
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions inc/fields/selectfield.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,10 @@ public function getEmptyParameters() {
}

public function equals($value) {
if ($value == '') {
// empty string means no selection
$value = '0';
}
return $this->value == $value;
}

Expand Down

0 comments on commit 89fb9dd

Please sign in to comment.