From 91bb5faaff4ff41771606c58f608afd76263b8c7 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sun, 9 Oct 2005 14:48:33 +0200 Subject: ignore regexp failures when handling asian chars The new handling of asian chars as single words needs a recent PCRE library (PHP 4.3.10 is known work). If this support isn't available the regexp compilation will fail. This patch adds a workaround - this means the search will not work as expected with asian words on older PHP versions. darcs-hash:20051009124833-7ad00-1319829be5cb73246e13eb65e4c950d43c6ce5bf.gz --- inc/fulltext.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'inc/fulltext.php') diff --git a/inc/fulltext.php b/inc/fulltext.php index 89fa5b259..4d4b8138c 100644 --- a/inc/fulltext.php +++ b/inc/fulltext.php @@ -265,7 +265,7 @@ function ft_queryParser($query){ if(count($token)) $q['not'] = array_merge($q['not'],$token); }else{ // asian "words" need to be searched as phrases - if(preg_match_all('/('.IDX_ASIAN.'+)/u',$w,$matches)){ + if(@preg_match_all('/('.IDX_ASIAN.'+)/u',$w,$matches)){ $q['phrases'] = array_merge($q['phrases'],$matches[1]); } -- cgit v1.2.3