Merge pull request #12071 from guzzisti/patch-2
fix exception when adding a poll option without votes
This commit is contained in:
commit
2bdf2b02e3
1 changed files with 1 additions and 1 deletions
|
@ -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']);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue