From 5feb9dba3106b2ce6356516c8e6dad3047ee0957 Mon Sep 17 00:00:00 2001 From: Will Taylor-Jackson Date: Tue, 23 Apr 2024 09:15:28 +0100 Subject: [PATCH] fix: don't double negative --- src/QueryGrammar.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/QueryGrammar.php b/src/QueryGrammar.php index 8651e4e..256a55e 100644 --- a/src/QueryGrammar.php +++ b/src/QueryGrammar.php @@ -165,7 +165,7 @@ protected function compileWhereBasic(Builder $builder, array $where): array ], ]; - $where['not'] = !$value; + $where['not'] = ($where['type'] ?? null) === 'NotNull' ? false : !$value; } elseif (in_array($where['operator'], array_keys($operatorsMap))) { $operator = $operatorsMap[$where['operator']]; $query = [