Explorar el Código

Trim whitepsace from each argument

Chris Smith hace 11 años
padre
commit
9a0f4392da
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      src/Composer/Util/RemoteFilesystem.php

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

@@ -154,7 +154,7 @@ class RemoteFilesystem
 
                 if ($key = array_search('X-GitHub-OTP', $headerNames)) {
                     $headers = $e->getHeaders();
-                    list($required, $method) = explode(';', trim(substr(strstr($headers[$key], ':'), 1)));
+                    list($required, $method) = array_map('trim', explode(';', substr(strstr($headers[$key], ':'), 1)));
 
                     if ('required' === $required) {
                         $this->io->write('Two-factor Authentication');