From: Greg Sabino Mullane Date: Thu, 26 Apr 2007 19:35:27 +0000 (+0000) Subject: Don't try to highlight non-words. X-Git-Tag: 1.31.0-rc.0~53217 X-Git-Url: http://git.cyclocoop.org/%22.%28%24lien.?a=commitdiff_plain;h=57b41fad2cccdf018cb7be0c9d1fc1a7cba88ced;p=lhc%2Fweb%2Fwiklou.git Don't try to highlight non-words. --- 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; } } }