From a2e1989b012e3f77a18c2758cd913245ce3c180b Mon Sep 17 00:00:00 2001 From: Dhruv Date: Fri, 17 Aug 2012 00:11:32 +0530 Subject: [PATCH] [ticket/11051] use get_word_length in search backend Use get_word_length() instead od accessing the word_length property directly as it is now protected. PHPBB3-11051 --- phpBB/search.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/phpBB/search.php b/phpBB/search.php index fd67b483e8..54f0f225a0 100644 --- a/phpBB/search.php +++ b/phpBB/search.php @@ -294,7 +294,9 @@ if ($keywords || $author || $author_id || $search_id || $submit) if (!$correct_query || (!$search->get_search_query() && !sizeof($author_id_ary) && !$search_id)) { $ignored = (sizeof($search->get_common_words())) ? sprintf($user->lang['IGNORED_TERMS_EXPLAIN'], implode(' ', $search->get_common_words())) . '
' : ''; - trigger_error($ignored . $user->lang('NO_KEYWORDS', $user->lang('CHARACTERS', (int) $search->word_length['min']), $user->lang('CHARACTERS', (int) $search->word_length['max']))); + // 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']))); } }