Correct Array style for returning Multiple HTTP Headers. See #12045

git-svn-id: http://svn.automattic.com/wordpress/trunk@13847 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
dd32 2010-03-28 00:23:40 +00:00
parent 45b1a1fe24
commit 334670a67a
1 changed files with 3 additions and 1 deletions

View File

@ -450,7 +450,9 @@ class WP_Http {
if ( !empty( $value ) ) {
$key = strtolower( $key );
if ( isset( $newheaders[$key] ) ) {
$newheaders[$key] = array( $newheaders[$key], trim( $value ) );
if ( !is_array($newheaders[$key]) )
$newheaders[$key] = array($newheaders[$key]);
$newheaders[$key][] = trim( $value );
} else {
$newheaders[$key] = trim( $value );
}