Skip to content
This repository was archived by the owner on Jan 9, 2024. It is now read-only.

Commit 9212a50

Browse files
freezer278msonowal
authored andcommitted
fixed where null issue
1 parent 4e598e2 commit 9212a50

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/Engines/Modes/Mode.php

+6-3
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,12 @@ protected function buildWheres(Builder $builder)
3535
$operator = $parsedWhere[1];
3636
$value = $parsedWhere[2];
3737

38-
$this->whereParams[$field] = $value;
39-
40-
$queryString .= "$field $operator ? AND ";
38+
if ($value !== null) {
39+
$this->whereParams[$field] = $value;
40+
$queryString .= "$field $operator ? AND ";
41+
} else {
42+
$queryString .= "$field IS NULL AND ";
43+
}
4144
}
4245

4346
return $queryString;

0 commit comments

Comments
 (0)