From 9ab08d10516aa0d5350ff9727992ddccd8d90922 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Cmlindenhofer=E2=80=9D?= Date: Tue, 14 Nov 2023 10:42:21 +0100 Subject: [PATCH] copy Bugfix from here https://github.com/tractorcow-farm/silverstripe-fluent/pull/793 to Version 6.0 --- src/Extension/FluentExtension.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Extension/FluentExtension.php b/src/Extension/FluentExtension.php index 69b2cc57..7aa7f354 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 ];