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
$composerConfig = array(
'vendor-dir' => 'vendor',
'repositories' => array(),
);
$packageConfig = $file->read();
@ -73,9 +72,11 @@ class Factory
// load default repository unless it's explicitly disabled
$loadPackagist = true;
foreach ($packageConfig['repositories'] as $repo) {
if (isset($repo['packagist']) && $repo['packagist'] === false) {
$loadPackagist = false;
if (isset($packageConfig['repositories'])) {
foreach ($packageConfig['repositories'] as $repo) {
if (isset($repo['packagist']) && $repo['packagist'] === false) {
$loadPackagist = false;
}
}
}
if ($loadPackagist) {