From acd0bbc366cf23bfe3cfb1a1959f0db31085cf19 Mon Sep 17 00:00:00 2001 From: rGaillard Date: Thu, 5 Dec 2013 11:26:26 +0100 Subject: [PATCH] // php warning --- modules/dashgoals/dashgoals.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/dashgoals/dashgoals.php b/modules/dashgoals/dashgoals.php index ab25dd934..636f646f0 100644 --- a/modules/dashgoals/dashgoals.php +++ b/modules/dashgoals/dashgoals.php @@ -235,7 +235,9 @@ class Dashgoals extends Module $fullfilment = round($value / $month_goal, 2); // Base rate is essential here : it determines the value of the goal compared to the "100%" of the chart legend - $base_rate = $month_goal / $average_goal; + $base_rate = 0; + if ($average_goal && $month_goal) + $base_rate = $month_goal / $average_goal; // Fullfilment of 1 means that we performed exactly anticipated if ($fullfilment == 1)