Only use "platform" config if it is an array.
Another option could have been to adjust the test that failed so a platform array is returned from the mock config object but this feels more robust. If "platform" config is set to a non-array value it is silently ignored now.pull/2990/head
parent
19b3955022
commit
bb375b1e75
|
@ -196,7 +196,9 @@ class Installer
|
||||||
|
|
||||||
// create installed repo, this contains all local packages + platform packages (php & extensions)
|
// create installed repo, this contains all local packages + platform packages (php & extensions)
|
||||||
$localRepo = $this->repositoryManager->getLocalRepository();
|
$localRepo = $this->repositoryManager->getLocalRepository();
|
||||||
$platformRepo = new PlatformRepository($this->config->get('platform'));
|
$platformOverride = $this->config->get('platform');
|
||||||
|
$platformOverride = is_array($platformOverride) ? $platformOverride : array();
|
||||||
|
$platformRepo = new PlatformRepository($platformOverride);
|
||||||
$repos = array(
|
$repos = array(
|
||||||
$localRepo,
|
$localRepo,
|
||||||
new InstalledArrayRepository(array($installedRootPackage)),
|
new InstalledArrayRepository(array($installedRootPackage)),
|
||||||
|
|
Loading…
Reference in New Issue