aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
author3D-I <480857+3D-I@users.noreply.github.com>2019-12-23 21:36:13 +0100
committer3D-I <480857+3D-I@users.noreply.github.com>2019-12-23 21:36:13 +0100
commit0afd410ae7917eefe4750fbe8f0878f92a4063b7 (patch)
treefbe30e0b2658dd93edd0b1d97b0ca20249adfd5d
parent1a9ab15f26e95c73e8ea94b866a97ee314b2b37e (diff)
downloadforums-0afd410ae7917eefe4750fbe8f0878f92a4063b7.tar
forums-0afd410ae7917eefe4750fbe8f0878f92a4063b7.tar.gz
forums-0afd410ae7917eefe4750fbe8f0878f92a4063b7.tar.bz2
forums-0afd410ae7917eefe4750fbe8f0878f92a4063b7.tar.xz
forums-0afd410ae7917eefe4750fbe8f0878f92a4063b7.zip
[ticket/15902] Out of range error with Sphinx search
The reporter he's waiting this fix to be in the core. I created this PR based on trusting his report. I can't test it. PHPBB3-15902
-rw-r--r--phpBB/phpbb/search/fulltext_sphinx.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/phpBB/phpbb/search/fulltext_sphinx.php b/phpBB/phpbb/search/fulltext_sphinx.php
index 2c2eb84dc7..1f4091791d 100644
--- a/phpBB/phpbb/search/fulltext_sphinx.php
+++ b/phpBB/phpbb/search/fulltext_sphinx.php
@@ -644,7 +644,7 @@ class fulltext_sphinx
$this->sphinx->SetFilter('deleted', array(0));
- $this->sphinx->SetLimits((int) $start, (int) $per_page, SPHINX_MAX_MATCHES);
+ $this->sphinx->SetLimits((int) $start, (int) $per_page, max(SPHINX_MAX_MATCHES, (int) $start + $per_page));
$result = $this->sphinx->Query($search_query_prefix . $this->sphinx->EscapeString(str_replace('&quot;', '"', $this->search_query)), $this->indexes);
// Could be connection to localhost:9312 failed (errno=111,