Skip to content

Commit

Permalink
Merge pull request #8217 from Sesquipedalian/custom_search_excludedWo…
Browse files Browse the repository at this point in the history
…rd_error

Fixes undefined variable error in custom search API
  • Loading branch information
Sesquipedalian committed May 21, 2024
2 parents 52c90db + 39cf106 commit b862808
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Sources/SearchAPI-Custom.php
Original file line number Diff line number Diff line change
Expand Up @@ -207,9 +207,9 @@ public function indexedWordQuery(array $words, array $search_data)
$query_where[] = 'subject NOT ' . $query_match_type . ' {string:exclude_subject_words_' . $count . '}';

if ($is_search_regex)
$query_params['exclude_subject_words_' . $count++] = $word_boundary_wrapper($escape_sql_regex($excludedWord));
$query_params['exclude_subject_words_' . $count++] = $word_boundary_wrapper($escape_sql_regex($phrase));
else
$query_params['exclude_subject_words_' . $count++] = '%' . $smcFunc['db_escape_wildcard_string']($excludedWord) . '%';
$query_params['exclude_subject_words_' . $count++] = '%' . $smcFunc['db_escape_wildcard_string']($phrase) . '%';
}
$count = 0;
if (!empty($query_params['excluded_subject_words']) && empty($modSettings['search_force_index']))
Expand Down

0 comments on commit b862808

Please sign in to comment.