mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-08 04:18:52 +00:00
Merge pull request #6622 from rubencm/ticket/17323
[ticket/17323] Fix division by 0 when there is 0 posts
This commit is contained in:
commit
acddce37e6
1 changed files with 1 additions and 1 deletions
|
@ -516,7 +516,7 @@ class acp_search
|
||||||
$this->db->sql_freeresult($result);
|
$this->db->sql_freeresult($result);
|
||||||
|
|
||||||
$total_count = $done_count + $remain_count;
|
$total_count = $done_count + $remain_count;
|
||||||
$percent = ($done_count / $total_count) * 100;
|
$percent = $total_count > 0 ? ($done_count / $total_count) * 100 : 100;
|
||||||
|
|
||||||
return [
|
return [
|
||||||
'VALUE' => $done_count,
|
'VALUE' => $done_count,
|
||||||
|
|
Loading…
Add table
Reference in a new issue