1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-05-06 23:55:26 +02:00

[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
This commit is contained in:
Dhruv 2013-04-20 19:26:01 +05:30
parent d72b5aaf1b
commit ffed3d109e

View File

@ -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;