From 0620459e8de02e697cb2d1832e594bef0a218922 Mon Sep 17 00:00:00 2001 From: Dion Hulse Date: Sun, 28 Mar 2010 00:23:40 +0000 Subject: [PATCH] Correct Array style for returning Multiple HTTP Headers. See #12045 git-svn-id: https://develop.svn.wordpress.org/trunk@13847 602fd350-edb4-49c9-b593-d223f7449a82 --- 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 ); }