From ff6f7c4186269f0c07294260a59222b7b2f18f2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dark=E2=9D=B6?= <25451052+Dark1z@users.noreply.github.com> Date: Mon, 13 Dec 2021 00:38:35 +0530 Subject: [PATCH] [ticket/16940] Optimize phpBB Native Search - Fixed infinite loop PHPBB3-16940 --- phpBB/phpbb/search/backend/base.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/phpBB/phpbb/search/backend/base.php b/phpBB/phpbb/search/backend/base.php index 58e7be83f4..ff57189a85 100644 --- a/phpBB/phpbb/search/backend/base.php +++ b/phpBB/phpbb/search/backend/base.php @@ -357,7 +357,7 @@ abstract class base implements search_backend_interface $this->tidy(); $this->config['num_posts'] = $num_posts; - if ($post_counter <= $max_post_id) + if ($post_counter < $max_post_id) { $totaltime = microtime(true) - $starttime; $rows_per_second = $row_count / $totaltime; @@ -402,7 +402,7 @@ abstract class base implements search_backend_interface $post_counter = $ids[count($ids) - 1]; } - if ($post_counter <= $max_post_id) + if ($post_counter < $max_post_id) { $totaltime = microtime(true) - $starttime; $rows_per_second = $row_count / $totaltime;