1
0
Fork 0

Merge pull request #7756 from glaubinix/f/undefined-index-preprocess

VcsRepository: fix undefined index notice in preProcess
pull/7760/head
Jordi Boggiano 2018-10-30 11:39:02 +01:00 committed by GitHub
commit 5d92eea170
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -295,7 +295,8 @@ class VcsRepository extends ArrayRepository implements ConfigurableRepositoryInt
protected function preProcess(VcsDriverInterface $driver, array $data, $identifier) protected function preProcess(VcsDriverInterface $driver, array $data, $identifier)
{ {
// keep the name of the main identifier for all packages // keep the name of the main identifier for all packages
$data['name'] = $this->packageName ?: $data['name']; $dataPackageName = isset($data['name']) ? $data['name'] : null;
$data['name'] = $this->packageName ?: $dataPackageName;
if (!isset($data['dist'])) { if (!isset($data['dist'])) {
$data['dist'] = $driver->getDist($identifier); $data['dist'] = $driver->getDist($identifier);