From 034dd15197ada07594436d4d337246eeda734a36 Mon Sep 17 00:00:00 2001 From: mikey-harveycameron <117692712+mikey-harveycameron@users.noreply.github.com> Date: Wed, 31 May 2023 13:50:29 +1000 Subject: [PATCH] Update FluentExtension.php skip empty 'where' clauses --- src/Extension/FluentExtension.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Extension/FluentExtension.php b/src/Extension/FluentExtension.php index 69b2cc57..ae2e3a15 100644 --- a/src/Extension/FluentExtension.php +++ b/src/Extension/FluentExtension.php @@ -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 ];