WP_HTTP: Curl: $theHeaders is an array, not an object, introduced in [20370]. Props kurtpayne. Fixes #20389 See #20219

git-svn-id: http://svn.automattic.com/wordpress/trunk@20399 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
dd32 2012-04-07 07:16:30 +00:00
parent 170ce91194
commit 98e33b2f9b

View File

@ -1110,7 +1110,7 @@ class WP_Http_Curl {
$theBody = $theResponse;
// If no response
if ( 0 == strlen( $theResponse ) && empty( $theHeaders->headers ) ) {
if ( 0 == strlen( $theResponse ) && empty( $theHeaders['headers'] ) ) {
if ( $curl_error = curl_error( $handle ) )
return new WP_Error( 'http_request_failed', $curl_error );
if ( in_array( curl_getinfo( $handle, CURLINFO_HTTP_CODE ), array( 301, 302 ) ) )