diff --git a/src/Composer/Command/InitCommand.php b/src/Composer/Command/InitCommand.php index a44546b73..78c3ae211 100644 --- a/src/Composer/Command/InitCommand.php +++ b/src/Composer/Command/InitCommand.php @@ -335,9 +335,9 @@ EOT $exactMatch = null; $choices = array(); - foreach ($matches as $position => $package) { - $choices[] = sprintf(' %5s %s', "[$position]", $package['name']); - if ($package['name'] === $package) { + foreach ($matches as $position => $foundPackage) { + $choices[] = sprintf(' %5s %s', "[$position]", $foundPackage['name']); + if ($foundPackage['name'] === $package) { $exactMatch = true; break; }