ComposerRepository: handle packages.json with null value for package (#10189)
parent
37ce8969a4
commit
261d93aacf
|
@ -1038,10 +1038,12 @@ 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) {
|
||||||
|
if (isset($pkg['versions']) && is_array($pkg['versions'])) {
|
||||||
foreach ($pkg['versions'] as $metadata) {
|
foreach ($pkg['versions'] as $metadata) {
|
||||||
$packages[] = $metadata;
|
$packages[] = $metadata;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return $packages;
|
return $packages;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue