From 57b41fad2cccdf018cb7be0c9d1fc1a7cba88ced Mon Sep 17 00:00:00 2001 From: Greg Sabino Mullane Date: Thu, 26 Apr 2007 19:35:27 +0000 Subject: [PATCH] Don't try to highlight non-words. --- includes/SearchPostgres.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/includes/SearchPostgres.php b/includes/SearchPostgres.php index 421d9660f1..2589e70ecc 100644 --- a/includes/SearchPostgres.php +++ b/includes/SearchPostgres.php @@ -83,7 +83,8 @@ class SearchPostgres extends SearchEngine { else { $searchstring .= " & $terms[2]"; $safeterm = preg_replace('/\W+/', '', $terms[2]); - $this->searchTerms[$safeterm] = $safeterm; + if (strlen($safeterm)) + $this->searchTerms[$safeterm] = $safeterm; } } } -- 2.20.1