1
0
Fork 0

Fix ConsoleIO::select regression in which 1.5.3-1.6.2 returned the selected values instead of index keys, fixes #7000

pull/7032/merge
Jordi Boggiano 2018-01-24 10:19:21 +01:00
parent fd61a21bff
commit a567501e58
1 changed files with 10 additions and 1 deletions

View File

@ -289,7 +289,16 @@ class ConsoleIO extends BaseIO
$question->setErrorMessage($errorMessage); $question->setErrorMessage($errorMessage);
$question->setMultiselect($multiselect); $question->setMultiselect($multiselect);
return $helper->ask($this->input, $this->getErrorOutput(), $question); $result = $helper->ask($this->input, $this->getErrorOutput(), $question);
$results = array();
foreach ($choices as $index => $choice) {
if (in_array($choice, $result, true)) {
$results[] = (string) $index;
}
}
return $results;
} }
/** /**