Skip to content

Commit bde7f91

Browse files
committed
Fixed DBExprFilter when having empty string values
1 parent 3986a98 commit bde7f91

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Builder/Expr/DBExprFilter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ class DBExprFilter implements OptionalExpression {
2828
public function __construct(string $expression, array $data, $keyPath, $validator = null, $validationResultHandler = null) {
2929
$this->expression = $expression;
3030
$this->keyPath = $this->buildKey($keyPath);
31-
$this->hasValue = RecursiveStructureAccess::recursiveHas($data, $this->keyPath);
3231
$this->value = RecursiveStructureAccess::recursiveGet($data, $this->keyPath, null);
32+
$this->hasValue = is_scalar($this->value) ? trim((string) $this->value) !== '' : !empty($this->value);
3333
if($validator === null) {
3434
$validator = function() {
3535
return true;

0 commit comments

Comments
 (0)