Skip to content

Commit dd497c0

Browse files
authored
Merge pull request #9100 from jdarwood007/3.0/pollFix
[3.0] Remove default Poll choices
2 parents 37c743a + 35583cf commit dd497c0

1 file changed

Lines changed: 1 addition & 5 deletions

File tree

Sources/Poll.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1059,15 +1059,11 @@ protected function initNewPoll(): void
10591059
'guest_vote' => !empty($_POST['poll_guest_vote']),
10601060
]);
10611061

1062-
// Make all five poll choices empty.
1063-
Utils::$context['last_choice_id'] = 4;
1064-
1065-
for ($i = 0; $i <= Utils::$context['last_choice_id']; $i++) {
1062+
for ($i = 0; $i <= 4; $i++) {
10661063
$this->addChoice([
10671064
'id' => $i,
10681065
'number' => $i + 1,
10691066
'label' => '',
1070-
'is_last' => $i === Utils::$context['last_choice_id'],
10711067
], true);
10721068
}
10731069
}

0 commit comments

Comments
 (0)