From 334670a67a737bba21153b389770d4208086a28c Mon Sep 17 00:00:00 2001 From: dd32 Date: Sun, 28 Mar 2010 00:23:40 +0000 Subject: [PATCH] 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 --- wp-includes/class-http.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/wp-includes/class-http.php b/wp-includes/class-http.php index 43a0da34d8..a37f81a8e4 100644 --- a/wp-includes/class-http.php +++ b/wp-includes/class-http.php @@ -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 ); }