From c0a867f9dfd1668389c3f1a593905e85e6d15732 Mon Sep 17 00:00:00 2001 From: Ryan Cramer Date: Fri, 22 May 2020 14:49:13 -0400 Subject: [PATCH] Fix exception that was getting thrown during OR-group fulltext matching --- wire/core/DatabaseQuery.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/wire/core/DatabaseQuery.php b/wire/core/DatabaseQuery.php index 482e1f1e..b9334e7c 100644 --- a/wire/core/DatabaseQuery.php +++ b/wire/core/DatabaseQuery.php @@ -331,7 +331,9 @@ abstract class DatabaseQuery extends WireData { if(!empty($options['inSQL'])) { foreach(array_keys($bindValues) as $bindKey) { - if(strpos($options['inSQL'], $bindKey) === false) unset($bindValues[$bindKey]); + if(!preg_match('/' . $bindKey . '\b/', $options['inSQL'])) { + unset($bindValues[$bindKey]); + } } }