diff --git a/src/Database/Query.php b/src/Database/Query.php index ab8bf16e19a..cbbf849057c 100644 --- a/src/Database/Query.php +++ b/src/Database/Query.php @@ -882,7 +882,7 @@ public function where($conditions = null, $types = [], $overwrite = false) } /** - * Convenience method that adds a NOT NULL condition to the query + * Adds a NOT NULL or IS NULL expression to the query * * @param array $fields A list of fields that should be not null * @param bool $isNull Toggles between NOT NULL and NULL checks @@ -894,9 +894,9 @@ protected function whereNullOrNotNull($fields, $isNull = true) $this->where(function ($exp) use ($condition, $isNull) { if ($isNull) { return $exp->isNull($condition); - } else { - return $exp->isNotNull($condition); } + + return $exp->isNotNull($condition); }); }