ComposerRepository: handle packages.json with null value for package (#10189)
parent
37ce8969a4
commit
261d93aacf
|
@ -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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue