diff --git a/libraries/src/Http/Transport/SocketTransport.php b/libraries/src/Http/Transport/SocketTransport.php index 17e9395a1e49c..a7e64e766ce0a 100644 --- a/libraries/src/Http/Transport/SocketTransport.php +++ b/libraries/src/Http/Transport/SocketTransport.php @@ -130,8 +130,8 @@ public function request($method, UriInterface $uri, $data = null, array $headers $content = $this->getResponse($content); // Follow Http redirects - if ($content->code >= 301 && $content->code < 400 && isset($content->headers['Location'])) { - return $this->request($method, new Uri($content->headers['Location']), $data, $headers, $timeout, $userAgent); + if ($content->code >= 301 && $content->code < 400 && isset($content->headers['Location'][0])) { + return $this->request($method, new Uri($content->headers['Location'][0]), $data, $headers, $timeout, $userAgent); } return $content;