1
0
Fork 0

Merge pull request #8296 from rbairwell/fix-php74-accessarray-offset-on-path

Fixes a problem with path based repositories on PHP7.4
pull/8305/head
Jordi Boggiano 2019-08-29 15:16:53 +02:00 committed by GitHub
commit d3dc280322
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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) && $versionData['pretty_version']) {
$package['version'] = $versionData['pretty_version'];
} else {
$package['version'] = 'dev-master';
}
}
$output = '';