8000 [3.0.3] [console] Notice on QuestionHelper · Issue #18001 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content
[3.0.3] [console] Notice on QuestionHelper #18001
@shopblocks

Description

@shopblocks

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0