From 7563357a130f66dae05314d33700ca8487107c8b Mon Sep 17 00:00:00 2001 From: rylon Date: Wed, 10 Jun 2015 20:47:32 +0200 Subject: [PATCH] saimod todo division by zero fix --- sai/modules/saimod_sys_todo/todo_stats_data.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sai/modules/saimod_sys_todo/todo_stats_data.php b/sai/modules/saimod_sys_todo/todo_stats_data.php index 4f23655..c85d3a8 100644 --- a/sai/modules/saimod_sys_todo/todo_stats_data.php +++ b/sai/modules/saimod_sys_todo/todo_stats_data.php @@ -11,6 +11,6 @@ class todo_stats_data { $this->open = $all-$closed; $this->closed = $closed; $this->all = $all; - $this->perc = round($this->closed / $this->all * 100,2); + $this->perc = round($this->closed / ($this->all == 0 ? 1 : $this->all) * 100,2); } }