1
0
Fork 0

Fix repositories warning

pull/336/head
Jordi Boggiano 2012-02-20 11:55:32 +01:00
parent 005559dc2f
commit eb35244230
1 changed files with 5 additions and 4 deletions

View File

@ -51,7 +51,6 @@ class Factory
// Configuration defaults // Configuration defaults
$composerConfig = array( $composerConfig = array(
'vendor-dir' => 'vendor', 'vendor-dir' => 'vendor',
'repositories' => array(),
); );
$packageConfig = $file->read(); $packageConfig = $file->read();
@ -73,11 +72,13 @@ class Factory
// load default repository unless it's explicitly disabled // load default repository unless it's explicitly disabled
$loadPackagist = true; $loadPackagist = true;
if (isset($packageConfig['repositories'])) {
foreach ($packageConfig['repositories'] as $repo) { foreach ($packageConfig['repositories'] as $repo) {
if (isset($repo['packagist']) && $repo['packagist'] === false) { if (isset($repo['packagist']) && $repo['packagist'] === false) {
$loadPackagist = false; $loadPackagist = false;
} }
} }
}
if ($loadPackagist) { if ($loadPackagist) {
$this->addPackagistRepository($rm); $this->addPackagistRepository($rm);
} }