1113 | | if ( 0 == strlen($theResponse) && empty( $theHeaders ) ) { |
1114 | | if ( $curl_error = curl_error($handle) ) |
1115 | | return new WP_Error('http_request_failed', $curl_error); |
1116 | | if ( in_array( curl_getinfo( $handle, CURLINFO_HTTP_CODE ), array(301, 302) ) ) |
1117 | | return new WP_Error('http_request_failed', __('Too many redirects.')); |
| 1113 | if ( 0 == strlen( $theResponse ) && empty( $theHeaders->headers ) ) { |
| 1114 | if ( $curl_error = curl_error( $handle ) ) |
| 1115 | return new WP_Error( 'http_request_failed', $curl_error ); |
| 1116 | if ( in_array( curl_getinfo( $handle, CURLINFO_HTTP_CODE ), array( 301, 302 ) ) ) |
| 1117 | return new WP_Error( 'http_request_failed', __( 'Too many redirects.' ) ); |