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 c9072c7

Browse filesBrowse files
committed
Check value isset to avoid PHP notice
1 parent 2ecd793 commit c9072c7
Copy full SHA for c9072c7

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
@@ -229,7 +229,7 @@ public function choice($question, array $choices, $default = null)
229229
{
230230
if (null !== $default) {
231231
$values = array_flip($choices);
232-
$default = $values[$default];
232+
$default = isset($values[$default]) ? $values[$default] : $default;
233233
}
234234

235235
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.