diff --git a/libraries/src/Http/Transport/CurlTransport.php b/libraries/src/Http/Transport/CurlTransport.php index 78320ae860e03..47b3485e18593 100644 --- a/libraries/src/Http/Transport/CurlTransport.php +++ b/libraries/src/Http/Transport/CurlTransport.php @@ -190,7 +190,7 @@ public function request($method, UriInterface $uri, $data = null, array $headers // Manually follow redirects if server doesn't allow to follow location using curl if ($response->code >= 301 && $response->code < 400 && isset($response->headers['Location']) && (bool) $this->getOption('follow_location', true)) { - $redirect_uri = new Uri($response->headers['Location']); + $redirect_uri = new Uri($response->headers['Location'][0]); if (\in_array($redirect_uri->getScheme(), ['file', 'scp'])) { throw new \RuntimeException('Curl redirect cannot be used in file or scp requests.');