瀏覽代碼

Use proper defaults for IO authentications

Jordi Boggiano 9 年之前
父節點
當前提交
2617ec5d28
共有 1 個文件被更改,包括 3 次插入3 次删除
  1. 3 3
      src/Composer/IO/BaseIO.php

+ 3 - 3
src/Composer/IO/BaseIO.php

@@ -60,9 +60,9 @@ abstract class BaseIO implements IOInterface
      */
     public function loadConfiguration(Config $config)
     {
-        $githubOauth = $config->get('github-oauth');
-        $gitlabOauth = $config->get('gitlab-oauth');
-        $httpBasic = $config->get('http-basic');
+        $githubOauth = $config->get('github-oauth') ?: array();
+        $gitlabOauth = $config->get('gitlab-oauth') ?: array();
+        $httpBasic = $config->get('http-basic') ?: array();
 
         // Use COMPOSER_AUTH environment variable if set
         if ($composerAuthEnv = getenv('COMPOSER_AUTH')) {