Skip to content

Commit bcb929e

Browse files
committed
fix(selectfield): comparison with empty string
Signed-off-by: Thierry Bugier <[email protected]>
1 parent 4019a4d commit bcb929e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

inc/fields/selectfield.class.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,10 @@ public function getEmptyParameters() {
137137
}
138138

139139
public function equals($value) {
140+
if ($value == '') {
141+
// empty string means no selection
142+
$value = '0';
143+
}
140144
return $this->value == $value;
141145
}
142146

0 commit comments

Comments
 (0)