diff options
author | Marc Alexander <admin@m-a-styles.de> | 2019-12-24 16:20:04 +0100 |
---|---|---|
committer | Marc Alexander <admin@m-a-styles.de> | 2019-12-24 16:20:04 +0100 |
commit | 8fe5063a356e2c08988106518780f4b730f01d1b (patch) | |
tree | e28a01bd813a12934badd81216e3e89bfcaa9926 | |
parent | 91a60f871aa95d94b824de311bca2c305e30f1c3 (diff) | |
parent | 16070b55435d78013aea2eaa004b8ae8b4b5cd3b (diff) | |
download | forums-8fe5063a356e2c08988106518780f4b730f01d1b.tar forums-8fe5063a356e2c08988106518780f4b730f01d1b.tar.gz forums-8fe5063a356e2c08988106518780f4b730f01d1b.tar.bz2 forums-8fe5063a356e2c08988106518780f4b730f01d1b.tar.xz forums-8fe5063a356e2c08988106518780f4b730f01d1b.zip |
Merge pull request #5784 from 3D-I/ticket/15902
[ticket/15902] Out of range error with Sphinx search
-rw-r--r-- | phpBB/phpbb/search/fulltext_sphinx.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/phpBB/phpbb/search/fulltext_sphinx.php b/phpBB/phpbb/search/fulltext_sphinx.php index 2c2eb84dc7..e4617903c2 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('"', '"', $this->search_query)), $this->indexes); // Could be connection to localhost:9312 failed (errno=111, @@ -675,7 +675,7 @@ class fulltext_sphinx { $start = floor(($result_count - 1) / $per_page) * $per_page; - $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('"', '"', $this->search_query)), $this->indexes); // Could be connection to localhost:9312 failed (errno=111, |