From ff69aa56a1e20d1954131ae5a8e9c1af50fe1a8b Mon Sep 17 00:00:00 2001 From: Ryan Cramer Date: Sun, 20 Jul 2025 10:29:27 -0400 Subject: [PATCH] Update DatabaseQuerySelectFulltext so that too-long words combined with individual word-matching operators are truncated rather than removed. --- wire/core/DatabaseQuerySelectFulltext.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/wire/core/DatabaseQuerySelectFulltext.php b/wire/core/DatabaseQuerySelectFulltext.php index 6394188c..644e7bb7 100644 --- a/wire/core/DatabaseQuerySelectFulltext.php +++ b/wire/core/DatabaseQuerySelectFulltext.php @@ -1215,6 +1215,7 @@ class DatabaseQuerySelectFulltext extends Wire { 'stopwords' => true, // allow stopwords 'indexable' => false, // include only indexable words? 'alternates' => false, // include alternate versions of words? + 'truncate' => true, ); $options = count($options) ? array_merge($defaults, $options) : $defaults; @@ -1312,6 +1313,7 @@ class DatabaseQuerySelectFulltext extends Wire { * */ protected function strlen($value) { + $value = (string) $value; if(function_exists('mb_strlen')) { return mb_strlen($value); } else {