From b99e7a9e928942961305b4e8bed7a87af50091c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Wagner?= Date: Fri, 28 Oct 2022 18:51:35 +0200 Subject: [PATCH] fix exception when adding an poll option without votes --- src/Model/Item.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Model/Item.php b/src/Model/Item.php index c09b2754df..143b719bd3 100644 --- a/src/Model/Item.php +++ b/src/Model/Item.php @@ -3402,7 +3402,7 @@ class Item $percent = $option['replies'] / $question['voters'] * 100; $options[$key]['vote'] = DI::l10n()->tt('%2$s (%3$d%%, %1$d vote)', '%2$s (%3$d%%, %1$d votes)', $option['replies'], $option['name'], round($percent, 1)); } else { - $options[$key]['vote'] = DI::l10n()->tt('%2$s (%1$d vote)', '%2$s (%1$d votes)', $option['replies'], $option['name'], ); + $options[$key]['vote'] = DI::l10n()->tt('%2$s (%1$d vote)', '%2$s (%1$d votes)', $option['replies'], $option['name'], 0); } }