| Q |
A |
| Bug report? |
yes |
| Feature request? |
no |
| BC Break report? |
no |
| RFC? |
no |
| Symfony version |
3.2.8 |
ChoiceQuestion - invalid error handling if a choice array is empty.
protected function execute(InputInterface $input, OutputInterface $output)
{
$helper = $this->getHelper('question');
$question = new ChoiceQuestion(
'Please select your favorite color (defaults to red)',
[],
0
);
$question->setErrorMessage('Color %s is invalid.');
$color = $helper->ask($input, $output, $question);
$output->writeln('You have just selected: '.$color);
}
Results into infinite not descriptive warning/error message loop:

ChoiceQuestion - invalid error handling if a choice array is empty.
Results into infinite not descriptive warning/error message loop:
