Better Notice fixing and place a protective cast in the cookie handler. Fixes #9068 props filosofo.
git-svn-id: https://develop.svn.wordpress.org/trunk@10639 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
54b8501261
commit
6ccd5c2540
@ -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 );
|
||||
|
Loading…
Reference in New Issue
Block a user