1
0
Fork 0
mirror of https://github.com/composer/composer synced 2025-05-11 09:32:55 +00:00

Fix undefined index error, fixes #2224

This commit is contained in:
Jordi Boggiano 2013-09-02 11:21:37 +02:00
parent 72919e04b0
commit 80184b87d1

View file

@ -275,7 +275,7 @@ EOT
}
// select highest version if we have many
$package = $candidates[0];
$package = reset($candidates);
foreach ($candidates as $candidate) {
if (version_compare($package->getVersion(), $candidate->getVersion(), '<')) {
$package = $candidate;