Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 81fa862

Browse filesBrowse files
committed
Check value isset to avoid PHP notice
1 parent 6c3924c commit 81fa862
Copy full SHA for 81fa862

File tree

1 file changed

+1
-1
lines changed
Filter options

1 file changed

+1
-1
lines changed

‎src/Symfony/Component/Console/Style/SymfonyStyle.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Console/Style/SymfonyStyle.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ public function choice(string $question, array $choices, $default = null)
290290
{
291291
if (null !== $default) {
292292
$values = array_flip($choices);
293-
$default = $values[$default];
293+
$default = isset($values[$default]) ? $values[$default] : $default;
294294
}
295295

296296
return $this->askQuestion(new ChoiceQuestion($question, $choices, $default));

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.