Browse Source

Fix the problem at the source, refs #3322

Jordi Boggiano 10 years ago
parent
commit
73e9db5d99

+ 2 - 1
src/Composer/Command/InitCommand.php

@@ -333,7 +333,8 @@ EOT
         }
 
         while (null !== $package = $dialog->ask($output, $prompt)) {
-            $matches = array_values($this->findPackages($package));
+            $matches = $this->findPackages($package);
+
             if (count($matches)) {
                 $exactMatch = null;
                 $choices = array();

+ 1 - 1
src/Composer/Repository/ArrayRepository.php

@@ -98,7 +98,7 @@ class ArrayRepository implements RepositoryInterface
             }
         }
 
-        return $matches;
+        return array_values($matches);
     }
 
     /**