1
0
Fork 0

Fix false return value in findPackage, fixes #10622

pull/10629/head
Jordi Boggiano 2022-03-16 14:35:59 +01:00
parent 8d446bef67
commit a7c2bd8aa1
No known key found for this signature in database
GPG Key ID: 7BBD42C429EC80BC
1 changed files with 5 additions and 1 deletions

View File

@ -208,7 +208,11 @@ class ComposerRepository extends ArrayRepository implements ConfigurableReposito
$packages = $this->loadAsyncPackages(array($name => $constraint));
return reset($packages['packages']);
if (count($packages['packages']) > 0) {
return reset($packages['packages']);
}
return null;
}
if ($hasProviders) {