1
0
Fork 0

ConsoleIO::select for a single option, fixes #7106, closes #7107

pull/7096/merge
dmsmidt 2018-02-11 21:49:43 +01:00 committed by Jordi Boggiano
parent ec9ba46c5f
commit 556148510b
1 changed files with 4 additions and 0 deletions

View File

@ -291,6 +291,10 @@ class ConsoleIO extends BaseIO
$result = $helper->ask($this->input, $this->getErrorOutput(), $question);
if (!is_array($result)) {
return (string) array_search($result, $choices, true);
}
$results = array();
foreach ($choices as $index => $choice) {
if (in_array($choice, $result, true)) {