diff --git a/library/Zend/Http/Client.php b/library/Zend/Http/Client.php index b704249cc2..777870bfa2 100644 --- a/library/Zend/Http/Client.php +++ b/library/Zend/Http/Client.php @@ -1122,6 +1122,11 @@ public function request($method = null) // If we got redirected, look for the Location header if ($response->isRedirect() && ($location = $response->getHeader('location'))) { + // Location header can be returned as an array + if (is_array($location)) { + $location = reset($location); + } + // Avoid problems with buggy servers that add whitespace at the // end of some headers (See ZF-11283) $location = trim($location);