1
0
Fork 0

Add PHP 5.3 compatibility

pull/7927/head
Sascha Egerer 2018-12-17 15:21:03 +01:00 committed by Jordi Boggiano
parent 1845adcfbd
commit 82ecf95a3c
1 changed files with 2 additions and 2 deletions

View File

@ -1319,7 +1319,7 @@ class Installer
$packageQueue = new \SplQueue; $packageQueue = new \SplQueue;
$depPackages = $pool->whatProvides($packageName); $depPackages = $pool->whatProvides($packageName);
$matchesByPattern = []; $matchesByPattern = array();
// check if the name is a glob pattern that did not match directly // check if the name is a glob pattern that did not match directly
if (empty($depPackages)) { if (empty($depPackages)) {
$whitelistPatternSearchRegexp = BasePackage::packageNameToRegexp($packageName, '^%s$'); $whitelistPatternSearchRegexp = BasePackage::packageNameToRegexp($packageName, '^%s$');
@ -1336,7 +1336,7 @@ class Installer
} }
if (!empty($matchesByPattern)) { if (!empty($matchesByPattern)) {
$depPackages = array_merge($depPackages, array_merge(...$matchesByPattern)); $depPackages = array_merge($depPackages, call_user_func_array('array_merge', $matchesByPattern));
} }
if (count($depPackages) == 0 && !$nameMatchesRequiredPackage && !in_array($packageName, array('nothing', 'lock', 'mirrors'))) { if (count($depPackages) == 0 && !$nameMatchesRequiredPackage && !in_array($packageName, array('nothing', 'lock', 'mirrors'))) {