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:
parent
170ce91194
commit
98e33b2f9b
|
@ -1110,7 +1110,7 @@ class WP_Http_Curl {
|
||||||
$theBody = $theResponse;
|
$theBody = $theResponse;
|
||||||
|
|
||||||
// If no response
|
// If no response
|
||||||
if ( 0 == strlen( $theResponse ) && empty( $theHeaders->headers ) ) {
|
if ( 0 == strlen( $theResponse ) && empty( $theHeaders['headers'] ) ) {
|
||||||
if ( $curl_error = curl_error( $handle ) )
|
if ( $curl_error = curl_error( $handle ) )
|
||||||
return new WP_Error( 'http_request_failed', $curl_error );
|
return new WP_Error( 'http_request_failed', $curl_error );
|
||||||
if ( in_array( curl_getinfo( $handle, CURLINFO_HTTP_CODE ), array( 301, 302 ) ) )
|
if ( in_array( curl_getinfo( $handle, CURLINFO_HTTP_CODE ), array( 301, 302 ) ) )
|
||||||
|
|
Loading…
Reference in New Issue