From cccf01447f22e38d60ac71b0f85af324b462ddd8 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:37:04 +0530 Subject: [PATCH] [ticket/16940] Optimize phpBB Native Search - Fixed infinite loop PHPBB3-16940 --- phpBB/includes/acp/acp_search.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/phpBB/includes/acp/acp_search.php b/phpBB/includes/acp/acp_search.php index 5bc3c42a77..130a46e918 100644 --- a/phpBB/includes/acp/acp_search.php +++ b/phpBB/includes/acp/acp_search.php @@ -345,7 +345,7 @@ class acp_search // save the current state $this->save_state(); - if ($post_counter <= $this->max_post_id) + if ($post_counter < $this->max_post_id) { $totaltime = microtime(true) - $starttime; $rows_per_second = $row_count / $totaltime; @@ -431,7 +431,7 @@ class acp_search $this->search->tidy(); $config['num_posts'] = $num_posts; - if ($post_counter <= $this->max_post_id) + if ($post_counter < $this->max_post_id) { $totaltime = microtime(true) - $starttime; $rows_per_second = $row_count / $totaltime;