aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/search.php
diff options
context:
space:
mode:
authorDhruv <dhruv.goel92@gmail.com>2012-10-04 01:51:57 +0530
committerDhruv <dhruv.goel92@gmail.com>2012-10-04 01:51:57 +0530
commit52b25aaf20f512911a981958e0efa9365eb34489 (patch)
tree6e30bd5dac83edde4cdbdd66b6c783039fba24da /phpBB/search.php
parenta2e1989b012e3f77a18c2758cd913245ce3c180b (diff)
downloadforums-52b25aaf20f512911a981958e0efa9365eb34489.tar
forums-52b25aaf20f512911a981958e0efa9365eb34489.tar.gz
forums-52b25aaf20f512911a981958e0efa9365eb34489.tar.bz2
forums-52b25aaf20f512911a981958e0efa9365eb34489.tar.xz
forums-52b25aaf20f512911a981958e0efa9365eb34489.zip
[ticket/11051] add get_word_len() in sphinx search
get_word_len() for sphinx search backend returns false always and triggers proper error. PHPBB3-11051
Diffstat (limited to 'phpBB/search.php')
-rw-r--r--phpBB/search.php9
1 files changed, 8 insertions, 1 deletions
diff --git a/phpBB/search.php b/phpBB/search.php
index 54f0f225a0..e869c8eebd 100644
--- a/phpBB/search.php
+++ b/phpBB/search.php
@@ -296,7 +296,14 @@ if ($keywords || $author || $author_id || $search_id || $submit)
$ignored = (sizeof($search->get_common_words())) ? sprintf($user->lang['IGNORED_TERMS_EXPLAIN'], implode(' ', $search->get_common_words())) . '<br />' : '';
// Function cannot be directly used as associative array for php < 5.4
$word_length = $search->get_word_length();
- trigger_error($ignored . $user->lang('NO_KEYWORDS', $user->lang('CHARACTERS', (int) $word_length['min']), $user->lang('CHARACTERS', (int) $word_length['max'])));
+ if ($word_length)
+ {
+ trigger_error($ignored . $user->lang('NO_KEYWORDS', $user->lang('CHARACTERS', (int) $word_length['min']), $user->lang('CHARACTERS', (int) $word_length['max'])));
+ }
+ else
+ {
+ trigger_error($ignored);
+ }
}
}