aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--phpBB/includes/search/fulltext_sphinx.php10
-rw-r--r--phpBB/search.php9
2 files changed, 18 insertions, 1 deletions
diff --git a/phpBB/includes/search/fulltext_sphinx.php b/phpBB/includes/search/fulltext_sphinx.php
index 256c3a6d1c..a6cc47b836 100644
--- a/phpBB/includes/search/fulltext_sphinx.php
+++ b/phpBB/includes/search/fulltext_sphinx.php
@@ -109,6 +109,16 @@ class phpbb_search_fulltext_sphinx
}
/**
+ * Returns false as there is no word_len array
+ *
+ * @return false
+ */
+ public function get_word_length()
+ {
+ return false;
+ }
+
+ /**
* Returns the common_words array
*
* @return array common words that are ignored by search backend
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);
+ }
}
}