From 69a9df5febb0eeab74ac83a5b55ceb4cc0d69284 Mon Sep 17 00:00:00 2001 From: mikey-harveycameron <117692712+mikey-harveycameron@users.noreply.github.com> Date: Wed, 12 Apr 2023 10:58:48 +1000 Subject: [PATCH] skip empty 'where' clauses --- src/Extension/FluentExtension.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Extension/FluentExtension.php b/src/Extension/FluentExtension.php index 737c7c2d..280f9f54 100644 --- a/src/Extension/FluentExtension.php +++ b/src/Extension/FluentExtension.php @@ -581,7 +581,11 @@ public function augmentSQL(SQLSelect $query, DataQuery $dataQuery = null) // Apply substitutions $localisedPredicate = str_replace($conditionSearch, $conditionReplace, $predicate); - + + if (empty($localisedPredicate)) { + continue; + } + $where[$index] = [ $localisedPredicate => $parameters ];