Эх сурвалжийг харах

Fix headers array, fixes #2821

Jordi Boggiano 11 жил өмнө
parent
commit
b09fb521d2

+ 1 - 1
src/Composer/Util/GitHub.php

@@ -129,7 +129,7 @@ class GitHub
 
 
                 // no existing token, create one
                 // no existing token, create one
                 if (empty($contents['token'])) {
                 if (empty($contents['token'])) {
-                    $headers[] = array('Content-Type: application/json');
+                    $headers[] = 'Content-Type: application/json';
 
 
                     $contents = JsonFile::parseJson($this->remoteFilesystem->getContents($originUrl, 'https://'. $apiUrl . '/authorizations', false, array(
                     $contents = JsonFile::parseJson($this->remoteFilesystem->getContents($originUrl, 'https://'. $apiUrl . '/authorizations', false, array(
                         'retry-auth-failure' => false,
                         'retry-auth-failure' => false,