mirror of
https://github.com/composer/composer
synced 2025-05-10 17:12:51 +00:00
ComposerRepository: handle packages.json with null value for package (#10189)
This commit is contained in:
parent
37ce8969a4
commit
261d93aacf
1 changed files with 4 additions and 2 deletions
|
@ -1038,8 +1038,10 @@ class ComposerRepository extends ArrayRepository implements ConfigurableReposito
|
|||
// legacy repo handling
|
||||
if (!isset($data['packages']) && !isset($data['includes'])) {
|
||||
foreach ($data as $pkg) {
|
||||
foreach ($pkg['versions'] as $metadata) {
|
||||
$packages[] = $metadata;
|
||||
if (isset($pkg['versions']) && is_array($pkg['versions'])) {
|
||||
foreach ($pkg['versions'] as $metadata) {
|
||||
$packages[] = $metadata;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue