1
0
Fork 0

ComposerRepository: handle packages.json with null value for package (#10189)

pull/10198/head
Stephan 2021-10-19 12:14:12 +01:00 committed by GitHub
parent 37ce8969a4
commit 261d93aacf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 2 deletions

View File

@ -1038,8 +1038,10 @@ class ComposerRepository extends ArrayRepository implements ConfigurableReposito
// legacy repo handling // legacy repo handling
if (!isset($data['packages']) && !isset($data['includes'])) { if (!isset($data['packages']) && !isset($data['includes'])) {
foreach ($data as $pkg) { foreach ($data as $pkg) {
foreach ($pkg['versions'] as $metadata) { if (isset($pkg['versions']) && is_array($pkg['versions'])) {
$packages[] = $metadata; foreach ($pkg['versions'] as $metadata) {
$packages[] = $metadata;
}
} }
} }