1
0
mirror of https://github.com/processwire/processwire.git synced 2025-08-06 14:57:10 +02:00
This commit is contained in:
Ryan Cramer
2025-01-07 10:42:38 -05:00
parent 9db14e6aef
commit 552fd7180e

View File

@@ -1269,7 +1269,7 @@ class DatabaseQuerySelectFulltext extends Wire {
if(strpos($likeValue, "'") !== false || strpos($likeValue, "") !== false) {
// match either straight or curly apostrophe
$likeValue = preg_replace('/[\']+/', '(\'|)', $likeValue);
$likeValue = str_replace([ "'", "" ], "('|)", $likeValue);
// if word ends with apostrophe then apostrophe is optional
$likeValue = rtrim(str_replace("('|) ", "('|)? ", "$likeValue "));
}