Skip to content

Commit bba098d

Browse files
authored
Add support for IS NOT NULL
1 parent 03c5337 commit bba098d

File tree

1 file changed

+6
-1
lines changed
  • src/Codeception/Lib/Driver

1 file changed

+6
-1
lines changed

src/Codeception/Lib/Driver/Db.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,12 @@ protected function generateWhereClause(array &$criteria)
215215
$params = [];
216216
foreach ($criteria as $k => $v) {
217217
if ($v === null) {
218-
$params[] = $this->getQuotedName($k) . " IS NULL ";
218+
if (stripos($k, ' !=') > 0) {
219+
$params[] = $this->getQuotedName(str_ireplace(" !=", '', $k)) . " IS NOT NULL ";
220+
} else {
221+
$params[] = $this->getQuotedName($k) . " IS NULL ";
222+
}
223+
219224
unset($criteria[$k]);
220225
continue;
221226
}

0 commit comments

Comments
 (0)