WP_Http: cURL: Use the parsed args $r, rather than the raw $args. Mentioned in #20219

git-svn-id: https://develop.svn.wordpress.org/trunk@20207 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Dion Hulse 2012-03-18 03:12:12 +00:00
parent 15c3656249
commit 652212f123
1 changed files with 3 additions and 3 deletions

View File

@ -1020,8 +1020,8 @@ class WP_Http_Curl {
}
}
$is_local = isset($args['local']) && $args['local'];
$ssl_verify = isset($args['sslverify']) && $args['sslverify'];
$is_local = isset($r['local']) && $r['local'];
$ssl_verify = isset($r['sslverify']) && $r['sslverify'];
if ( $is_local )
$ssl_verify = apply_filters('https_local_ssl_verify', $ssl_verify);
elseif ( ! $is_local )
@ -1112,7 +1112,7 @@ class WP_Http_Curl {
$theBody = $theResponse;
// If no response, and It's not a HEAD request with valid headers returned
if ( 0 == strlen($theResponse) && ('HEAD' != $args['method'] || empty($this->headers)) ) {
if ( 0 == strlen($theResponse) && ('HEAD' != $r['method'] || empty($this->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) ) )