diff options
author | Andreas Gohr <andi@splitbrain.org> | 2005-10-09 14:48:33 +0200 |
---|---|---|
committer | Andreas Gohr <andi@splitbrain.org> | 2005-10-09 14:48:33 +0200 |
commit | 91bb5faaff4ff41771606c58f608afd76263b8c7 (patch) | |
tree | 2182f0f0147053a05880d40beaea92eb8d5e7fcc /inc/fulltext.php | |
parent | 037f7611417e32cbedc686d949b2ed6f25653868 (diff) | |
download | rpg-91bb5faaff4ff41771606c58f608afd76263b8c7.tar.gz rpg-91bb5faaff4ff41771606c58f608afd76263b8c7.tar.bz2 |
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
Diffstat (limited to 'inc/fulltext.php')
-rw-r--r-- | inc/fulltext.php | 2 |
1 files changed, 1 insertions, 1 deletions
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]); } |