From 807d71d1f57474ef589c3fda052520a8a32e60d0 Mon Sep 17 00:00:00 2001 From: janschoenherr Date: Wed, 3 Jul 2024 14:38:55 +0200 Subject: [PATCH] Change redirect url (from headers['Location']) from array to string (#43734) * Change redirect url (from headers['Location']) from array to string * Update SocketTransport.php --- libraries/src/Http/Transport/SocketTransport.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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;