diff --git a/phpBB/includes/search/fulltext_native.php b/phpBB/includes/search/fulltext_native.php index dc961f3c8a..7fff83db58 100644 --- a/phpBB/includes/search/fulltext_native.php +++ b/phpBB/includes/search/fulltext_native.php @@ -233,6 +233,12 @@ class fulltext_native extends search_backend } unset($exact_words); + // Handle +, - without preceeding whitespace character + $match = array('#(\S)\+#', '#(\S)-#'); + $replace = array('$1 +', '$1 +'); + + $keywords = preg_replace($match, $replace, $keywords); + // now analyse the search query, first split it using the spaces $query = explode(' ', $keywords);