Skip to content

Commit

Permalink
Update FluentExtension.php
Browse files Browse the repository at this point in the history
skip empty 'where' clauses
  • Loading branch information
mikey-harveycameron authored May 31, 2023
1 parent 37656d2 commit 034dd15
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Extension/FluentExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -583,6 +583,10 @@ public function augmentSQL(SQLSelect $query, DataQuery $dataQuery = null)
// Apply substitutions
$localisedPredicate = str_replace($conditionSearch, $conditionReplace, $predicate);

if (empty($localisedPredicate)) {
continue;
}

$where[$index] = [
$localisedPredicate => $parameters
];
Expand Down

0 comments on commit 034dd15

Please sign in to comment.