]> git.mxchange.org Git - friendica.git/commitdiff
fix exception when adding an poll option without votes
authorRené Wagner <rwa@clttr.info>
Fri, 28 Oct 2022 16:51:35 +0000 (18:51 +0200)
committerGitHub <noreply@github.com>
Fri, 28 Oct 2022 16:51:35 +0000 (18:51 +0200)
src/Model/Item.php

index c09b2754df855fb196b470bec20f4715d2d29a44..143b719bd3efbcf06d3206ef5d50ae8f3b7da5ed 100644 (file)
@@ -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);
                                }
                        }