1
0
Fork 0

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
Joakim Israelsson 2014-05-15 13:36:40 +02:00
parent 19b3955022
commit bb375b1e75
1 changed files with 3 additions and 1 deletions

View File

@ -196,7 +196,9 @@ class Installer
// create installed repo, this contains all local packages + platform packages (php & extensions)
$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(
$localRepo,
new InstalledArrayRepository(array($installedRootPackage)),