diff --git a/src/Contracts/Converter/CustomQueriesTrait.php b/src/Contracts/Converter/CustomQueriesTrait.php index ef3e92e..9b97890 100644 --- a/src/Contracts/Converter/CustomQueriesTrait.php +++ b/src/Contracts/Converter/CustomQueriesTrait.php @@ -91,7 +91,7 @@ public function setCustomConditions(?string $query) : void */ public function setCustomLimit(?int $limit): void { - if (is_null($limit)) { + if (!is_null($limit)) { $this->limit = $limit; } } diff --git a/src/Converter/RequestUriToSql.php b/src/Converter/RequestUriToSql.php index dfd7b46..398c823 100755 --- a/src/Converter/RequestUriToSql.php +++ b/src/Converter/RequestUriToSql.php @@ -367,7 +367,7 @@ protected function prepareNormalSql(array $searchCriteria, string $classname, st $operator = 'LIKE'; } - if ($value = 'null') { + if ($value == 'null') { $logicConector = !$vKey ? ' ' . $andOr . ' (' : ' OR '; $sql .= $logicConector . $classname . '.' . $searchField . ' IS NULL'; } else {