Do not divide by zero if the number of active TUs is unknown.
Signed-off-by: Lukas Fleischer <[email protected]>
---
web/template/tu_details.php | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/web/template/tu_details.php b/web/template/tu_details.php
index c09e30c..667956b 100644
--- a/web/template/tu_details.php
+++ b/web/template/tu_details.php
@@ -6,7 +6,9 @@ $active_tus = $row["ActiveTUs"];
$quorum = $row["Quorum"];
$total = $yes + $no + $abstain;
-$participation = $total / $active_tus;
+if ($active_tus > 0) {
+ $participation = $total / $active_tus;
+}
if ($yes > $active_tus / 2) {
$vote_accepted = true;
--
1.8.4.rc3.500.gc3113b0