Skip to content

Commit

Permalink
Fix fatal error on Drupal 10 w/ symfony/console:6.2+ (#5209)
Browse files Browse the repository at this point in the history
* Match upstream signature

* Pass to parent
  • Loading branch information
larowlan committed Sep 3, 2022
1 parent e1c9c04 commit d539194
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src-symfony-compatibility/v6/Style/DrushStyle.php
Expand Up @@ -23,11 +23,11 @@ public function confirm(string $question, bool $default = true): bool
return parent::confirm($question, $default);
}

public function choice(string $question, array $choices, mixed $default = null): mixed
public function choice(string $question, array $choices, mixed $default = null, bool $multiSelect = false): mixed
{
// Display the choices without their keys.
$choices_values = array_values($choices);
$return = parent::choice($question, $choices_values, $default);
$return = parent::choice($question, $choices_values, $default, $multiSelect);

return array_search($return, $choices);
}
Expand Down

0 comments on commit d539194

Please sign in to comment.