-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
Closed
Description
If I define my code as follows:
$question = new ChoiceQuestion('Is this server for Production or Staging', [
1 => 'production',
2 => 'staging',
], '1');
$choice = $this->question->ask($input, $output, $question);
If i run this question and then press the up arrow, I get undefined offset '0' error.
I want to be able to number these options myself. If i dont number, then everything is fine, but if i do number then this is the result we get.
Full error: PHP Notice: Undefined offset: 0 in /.../console/vendor/symfony/console/Helper/QuestionHelper.php on line 302