Add PHP 5.3 compatibility
parent
1845adcfbd
commit
82ecf95a3c
|
@ -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'))) {
|
||||||
|
|
Loading…
Reference in New Issue