Check value isset to avoid PHP notice
This commit is contained in:
parent
2ecd7936b1
commit
c9072c70ef
@ -229,7 +229,7 @@ class SymfonyStyle extends OutputStyle
|
|||||||
{
|
{
|
||||||
if (null !== $default) {
|
if (null !== $default) {
|
||||||
$values = array_flip($choices);
|
$values = array_flip($choices);
|
||||||
$default = $values[$default];
|
$default = isset($values[$default]) ? $values[$default] : $default;
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->askQuestion(new ChoiceQuestion($question, $choices, $default));
|
return $this->askQuestion(new ChoiceQuestion($question, $choices, $default));
|
||||||
|
Reference in New Issue
Block a user