Skip to content
Snippets Groups Projects
Commit 81ffdd4f authored by catch's avatar catch
Browse files

Issue #2602464 by heykarthikwithu, anil280988, rakesh.gectcr: Remove unused...

Issue #2602464 by heykarthikwithu, anil280988, rakesh.gectcr: Remove unused local variable and add return value to docs in _search_find_match_with_simplify() of 'search.module'
parent 099d11a3
No related branches found
No related tags found
No related merge requests found
......@@ -803,7 +803,7 @@ function search_excerpt($keys, $text, $langcode = NULL) {
* @param string|null $langcode
* Language code for the language of $text, if known.
*
* @return
* @return string|null
* A segment of $text that is between word boundary characters that either
* matches $key directly, or matches $key when both this text segment and
* $key are processed by search_simplify(). If a matching text segment is
......@@ -847,7 +847,6 @@ function _search_find_match_with_simplify($key, $text, $boundary, $langcode = NU
$words = preg_split('/' . $boundary . '+/u', $text, NULL, PREG_SPLIT_OFFSET_CAPTURE);
// Add an entry pointing to the end of the string, for the loop below.
$words[] = array('', strlen($text));
$num_words = count($words);
// Using a binary search, find the earliest possible ending position in
// $text where it will still match the keyword after applying
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment