From: René Wagner Date: Fri, 28 Oct 2022 16:51:35 +0000 (+0200) Subject: fix exception when adding an poll option without votes X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=b99e7a9e928942961305b4e8bed7a87af50091c1;p=friendica.git fix exception when adding an poll option without votes --- 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); } }