diff options
author | Dhruv <dhruv.goel92@gmail.com> | 2013-04-20 19:26:01 +0530 |
---|---|---|
committer | Dhruv <dhruv.goel92@gmail.com> | 2013-06-19 02:14:04 +0530 |
commit | ffed3d109e25756c4de2116b09d34c4c92d9b61c (patch) | |
tree | 09560b51b9030bd84f3a075056a41fbff2bdcde3 | |
parent | d72b5aaf1bd6d959c2b06e923ab76fc1f370e455 (diff) | |
download | forums-ffed3d109e25756c4de2116b09d34c4c92d9b61c.tar forums-ffed3d109e25756c4de2116b09d34c4c92d9b61c.tar.gz forums-ffed3d109e25756c4de2116b09d34c4c92d9b61c.tar.bz2 forums-ffed3d109e25756c4de2116b09d34c4c92d9b61c.tar.xz forums-ffed3d109e25756c4de2116b09d34c4c92d9b61c.zip |
[ticket/11437] avoid $start becoming negative when no search results are found
When search returns no results there is no need to go inside the if
statement. Since $result_count becomes zero, $start becomes negative
which leads to failed assertion.
PHPBB3-11437
-rw-r--r-- | phpBB/includes/search/fulltext_sphinx.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/phpBB/includes/search/fulltext_sphinx.php b/phpBB/includes/search/fulltext_sphinx.php index 63e35eb4af..889324bbda 100644 --- a/phpBB/includes/search/fulltext_sphinx.php +++ b/phpBB/includes/search/fulltext_sphinx.php @@ -611,7 +611,7 @@ class phpbb_search_fulltext_sphinx $result_count = $result['total_found']; - if ($start >= $result_count) + if ($result_count && $start >= $result_count) { $start = floor(($result_count - 1) / $per_page) * $per_page; |