From 3782b6c7ae51260b086edcda2a2e2a07a020b9fc Mon Sep 17 00:00:00 2001 From: Ryan Cramer Date: Sun, 18 Oct 2020 09:29:02 -0400 Subject: [PATCH] Fix issue where '~=' word matches with words containing underscore '_' weren't working due to change made in 3.0.167 --- wire/core/DatabaseQuerySelectFulltext.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/wire/core/DatabaseQuerySelectFulltext.php b/wire/core/DatabaseQuerySelectFulltext.php index a55c7997..b81e7e2a 100644 --- a/wire/core/DatabaseQuerySelectFulltext.php +++ b/wire/core/DatabaseQuerySelectFulltext.php @@ -489,7 +489,6 @@ class DatabaseQuerySelectFulltext extends Wire { foreach($data['likeWords'] as $word) { $isStopword = isset($data['stopWords'][$word]); if($isStopword && !$this->allowStopwords) continue; - $word = $this->escapeLike($word); if(!strlen($word)) continue; if($partial || ($partialLast && $word === $data['lastWord'])) { // just match partial word from beginning @@ -884,7 +883,7 @@ class DatabaseQuerySelectFulltext extends Wire { $likeWords = array(); $altWords = array(); $joinWords = array(); - $joiners = array('->', '-', '.', '_', ':'); + $joiners = array('->', '-', '.', ':'); // get all words $allWords = $this->words($value);