From acdc5b4665d4fefc084dd7b3dfebe1b51cc80b85 Mon Sep 17 00:00:00 2001 From: mctekk Date: Tue, 11 Feb 2020 17:04:53 -0400 Subject: [PATCH] hotfix variable null --- src/Contracts/Converter/CustomQueriesTrait.php | 2 +- src/Converter/RequestUriToSql.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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 {