1
0
Fork 0

Fixes a problem with path based repositories on PHP7.4 where an attempt is made to access null as an array

pull/8296/head
rbairwell 2019-08-27 20:53:57 +01:00
parent bfba228b5a
commit 550c01b471
1 changed files with 5 additions and 1 deletions

View File

@ -155,7 +155,11 @@ class PathRepository extends ArrayRepository implements ConfigurableRepositoryIn
if (!isset($package['version'])) {
$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 = '';