Skip to content
This repository has been archived by the owner on May 16, 2018. It is now read-only.

Error: trim() expects parameter 1 to be string, array given - library/Zend/Http/Client.php:1127 #667

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions library/Zend/Http/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down