From 0c17950d3ebc9b09d181f27e1306a676cb97c00a Mon Sep 17 00:00:00 2001 From: westi Date: Mon, 23 Feb 2009 21:55:49 +0000 Subject: [PATCH] Better Notice fixing and place a protective cast in the cookie handler. Fixes #9068 props filosofo. git-svn-id: http://svn.automattic.com/wordpress/trunk@10639 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/http.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-includes/http.php b/wp-includes/http.php index 61779225d..7daaecfd3 100644 --- a/wp-includes/http.php +++ b/wp-includes/http.php @@ -578,9 +578,9 @@ class WP_Http { * @param array $r Full array of args passed into ::request() */ function buildCookieHeader( &$r ) { - if ( isset($r['cookies']) && count( $r['cookies'] ) ) { + if ( ! empty($r['cookies']) ) { $cookies_header = ''; - foreach ( $r['cookies'] as $cookie ) { + foreach ( (array) $r['cookies'] as $cookie ) { $cookies_header .= $cookie->getHeaderValue() . '; '; } $cookies_header = substr( $cookies_header, 0, -2 );