Merge remote-tracking branch 'dhruvgoel92/ticket/11437' into develop

* dhruvgoel92/ticket/11437:
  [ticket/11437] avoid $start becoming negative when no search results are found
This commit is contained in:
Joas Schilling 2013-07-03 11:51:28 +02:00
commit 8ce7d36f70

View file

@ -611,7 +611,7 @@ class phpbb_search_fulltext_sphinx
$result_count = $result['total_found']; $result_count = $result['total_found'];
if ($start >= $result_count) if ($result_count && $start >= $result_count)
{ {
$start = floor(($result_count - 1) / $per_page) * $per_page; $start = floor(($result_count - 1) / $per_page) * $per_page;