Fix invalid call to array_merge
parent
50cb5fe3da
commit
dc59af555a
|
@ -1323,7 +1323,7 @@ class Installer
|
||||||
foreach ($this->updateWhitelist as $packageName => $void) {
|
foreach ($this->updateWhitelist as $packageName => $void) {
|
||||||
$packageQueue = new \SplQueue;
|
$packageQueue = new \SplQueue;
|
||||||
|
|
||||||
$depPackages = $pool->whatProvides($packageName);
|
$depPackages = [$pool->whatProvides($packageName)];
|
||||||
|
|
||||||
$nameMatchesRequiredPackage = in_array($packageName, $requiredPackageNames, true);
|
$nameMatchesRequiredPackage = in_array($packageName, $requiredPackageNames, true);
|
||||||
|
|
||||||
|
@ -1332,12 +1332,14 @@ class Installer
|
||||||
$whitelistPatternRegexp = BasePackage::packageNameToRegexp($packageName);
|
$whitelistPatternRegexp = BasePackage::packageNameToRegexp($packageName);
|
||||||
foreach ($rootRequiredPackageNames as $rootRequiredPackageName) {
|
foreach ($rootRequiredPackageNames as $rootRequiredPackageName) {
|
||||||
if (preg_match($whitelistPatternRegexp, $rootRequiredPackageName)) {
|
if (preg_match($whitelistPatternRegexp, $rootRequiredPackageName)) {
|
||||||
$depPackages = array_merge($pool->whatProvides($rootRequiredPackageName));
|
$depPackages[] = $pool->whatProvides($rootRequiredPackageName);
|
||||||
$nameMatchesRequiredPackage = true;
|
$nameMatchesRequiredPackage = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$depPackages = array_merge(...$depPackages);
|
||||||
|
|
||||||
if (count($depPackages) == 0 && !$nameMatchesRequiredPackage && !in_array($packageName, array('nothing', 'lock', 'mirrors'))) {
|
if (count($depPackages) == 0 && !$nameMatchesRequiredPackage && !in_array($packageName, array('nothing', 'lock', 'mirrors'))) {
|
||||||
$this->io->writeError('<warning>Package "' . $packageName . '" listed for update is not installed. Ignoring.</warning>');
|
$this->io->writeError('<warning>Package "' . $packageName . '" listed for update is not installed. Ignoring.</warning>');
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue