diff --git a/src/Composer/Command/InitCommand.php b/src/Composer/Command/InitCommand.php index 84bda9d90..59ef2d379 100644 --- a/src/Composer/Command/InitCommand.php +++ b/src/Composer/Command/InitCommand.php @@ -333,8 +333,7 @@ EOT } while (null !== $package = $dialog->ask($output, $prompt)) { - $matches = $this->findPackages($package); - + $matches = array_values($this->findPackages($package)); if (count($matches)) { $exactMatch = null; $choices = array();