Permalink
Browse files

Make sure these are handled as ints

Signed-off-by: jdarwood007 <unmonitored+github@sleepycode.com>
  • Loading branch information...
1 parent dbcd9cc commit 2fa7afa5e0d4b2ec99f5f1f91478d9641259f0dc @jdarwood007 jdarwood007 committed Nov 19, 2016
Showing with 2 additions and 2 deletions.
  1. +1 −1 SMF 2.0/SearchAPI-Sphinxql.php
  2. +1 −1 SMF 2.1/SearchAPI-Sphinxql.php
@@ -317,7 +317,7 @@ public function searchQuery($search_params, $search_words, $excluded_words, &$pa
}
$participants = array();
- foreach (array_slice(array_keys($cached_results['matches']), $_REQUEST['start'], $modSettings['search_results_per_page']) as $msgID)
+ foreach (array_slice(array_keys($cached_results['matches']), (int) $_REQUEST['start'], $modSettings['search_results_per_page']) as $msgID)
{
$context['topics'][$msgID] = $cached_results['matches'][$msgID];
$participants[$cached_results['matches'][$msgID]['id']] = false;
@@ -324,7 +324,7 @@ public function searchQuery(array $query_params, array $searchWords, array $excl
}
$participants = array();
- foreach (array_slice(array_keys($cached_results['matches']), $_REQUEST['start'], $modSettings['search_results_per_page']) as $msgID)
+ foreach (array_slice(array_keys($cached_results['matches']), (int) $_REQUEST['start'], $modSettings['search_results_per_page']) as $msgID)
{
$context['topics'][$msgID] = $cached_results['matches'][$msgID];
$participants[$cached_results['matches'][$msgID]['id']] = false;

0 comments on commit 2fa7afa

Please sign in to comment.