1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-30 21:40:43 +02:00

[ticket/17323] Fix division by 0 when there is 0 posts

PHPBB3-17323
This commit is contained in:
Ruben Calvo
2024-05-25 04:40:44 +02:00
parent c6fd14352e
commit 05fafdc445

View File

@@ -516,7 +516,7 @@ class acp_search
$this->db->sql_freeresult($result);
$total_count = $done_count + $remain_count;
$percent = ($done_count / $total_count) * 100;
$percent = $total_count > 0 ? ($done_count / $total_count) * 100 : 100;
return [
'VALUE' => $done_count,