Skip to content

Commit

Permalink
Merge pull request #37 from bakaphp/feature-custom-limit-and-sort
Browse files Browse the repository at this point in the history
hotfix variable null
  • Loading branch information
kaioken authored Feb 11, 2020
2 parents 0bdb987 + acdc5b4 commit cef98d8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Contracts/Converter/CustomQueriesTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/Converter/RequestUriToSql.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit cef98d8

Please sign in to comment.