From c9072c70efcceb151915cd0909ff819a13228d1c Mon Sep 17 00:00:00 2001 From: Leevi Graham Date: Fri, 25 Oct 2019 21:23:51 +1100 Subject: [PATCH] Check value isset to avoid PHP notice --- src/Symfony/Component/Console/Style/SymfonyStyle.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Component/Console/Style/SymfonyStyle.php b/src/Symfony/Component/Console/Style/SymfonyStyle.php index 4291ada8f6..02e9b471b8 100644 --- a/src/Symfony/Component/Console/Style/SymfonyStyle.php +++ b/src/Symfony/Component/Console/Style/SymfonyStyle.php @@ -229,7 +229,7 @@ class SymfonyStyle extends OutputStyle { if (null !== $default) { $values = array_flip($choices); - $default = $values[$default]; + $default = isset($values[$default]) ? $values[$default] : $default; } return $this->askQuestion(new ChoiceQuestion($question, $choices, $default));