Skip to content

Commit 35583cf

Browse files
committed
[3.0] Remove default Poll choices
Pulled out of SimpleMachines#7933, this does not need to be in the theme PR
1 parent c317265 commit 35583cf

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)