1
0
Fork 0
mirror of https://github.com/composer/composer synced 2025-05-11 01:22:54 +00:00

ComposerRepository: avoid notice if includes do not provide a sha1

This commit is contained in:
Stephan 2020-09-01 12:21:36 +01:00
parent b847c4dc3a
commit 773635e355

View file

@ -637,7 +637,7 @@ class ComposerRepository extends ArrayRepository implements ConfigurableReposito
if (isset($data['includes'])) {
foreach ($data['includes'] as $include => $metadata) {
if ($this->cache->sha1($include) === $metadata['sha1']) {
if (isset($metadata['sha1']) && $this->cache->sha1($include) === $metadata['sha1']) {
$includedData = json_decode($this->cache->read($include), true);
} else {
$includedData = $this->fetchFile($include);