mirror of
https://github.com/composer/composer
synced 2025-05-11 01:22:54 +00:00
Fixes a problem with path based repositories on PHP7.4 where an attempt is made to access null as an array
This commit is contained in:
parent
bfba228b5a
commit
550c01b471
1 changed files with 5 additions and 1 deletions
|
@ -155,7 +155,11 @@ class PathRepository extends ArrayRepository implements ConfigurableRepositoryIn
|
||||||
|
|
||||||
if (!isset($package['version'])) {
|
if (!isset($package['version'])) {
|
||||||
$versionData = $this->versionGuesser->guessVersion($package, $path);
|
$versionData = $this->versionGuesser->guessVersion($package, $path);
|
||||||
$package['version'] = $versionData['pretty_version'] ?: 'dev-master';
|
if (is_array($versionData)) {
|
||||||
|
$package['version'] = $versionData['pretty_version'] ?: 'dev-master';
|
||||||
|
} else {
|
||||||
|
$package['version'] = 'dev-master';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$output = '';
|
$output = '';
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue