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.
main
Joakim Israelsson 10 years ago
parent 19b3955022
commit bb375b1e75

@ -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)),

Loading…
Cancel
Save