mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 01:27:36 +01:00
Coding Standards: Rename $theHeaders
variable to $processed_headers
in WP_Http_Curl::request()
.
This fixes a `Variable "$theHeaders" is not in valid snake_case format` WPCS warning. Follow-up to [8516], [8520], [51826], [51929]. See #53359. Built from https://develop.svn.wordpress.org/trunk@51931 git-svn-id: http://core.svn.wordpress.org/trunk@51524 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
cdf1000cbb
commit
d31f31c579
@ -256,7 +256,8 @@ class WP_Http_Curl {
|
||||
}
|
||||
|
||||
curl_exec( $handle );
|
||||
$theHeaders = WP_Http::processHeaders( $this->headers, $url );
|
||||
|
||||
$processed_headers = WP_Http::processHeaders( $this->headers, $url );
|
||||
$theBody = $this->body;
|
||||
$bytes_written_total = $this->bytes_written_total;
|
||||
|
||||
@ -267,7 +268,7 @@ class WP_Http_Curl {
|
||||
$curl_error = curl_errno( $handle );
|
||||
|
||||
// If an error occurred, or, no response.
|
||||
if ( $curl_error || ( 0 == strlen( $theBody ) && empty( $theHeaders['headers'] ) ) ) {
|
||||
if ( $curl_error || ( 0 == strlen( $theBody ) && empty( $processed_headers['headers'] ) ) ) {
|
||||
if ( CURLE_WRITE_ERROR /* 23 */ == $curl_error ) {
|
||||
if ( ! $this->max_body_length || $this->max_body_length != $bytes_written_total ) {
|
||||
if ( $parsed_args['stream'] ) {
|
||||
@ -299,10 +300,10 @@ class WP_Http_Curl {
|
||||
}
|
||||
|
||||
$response = array(
|
||||
'headers' => $theHeaders['headers'],
|
||||
'headers' => $processed_headers['headers'],
|
||||
'body' => null,
|
||||
'response' => $theHeaders['response'],
|
||||
'cookies' => $theHeaders['cookies'],
|
||||
'response' => $processed_headers['response'],
|
||||
'cookies' => $processed_headers['cookies'],
|
||||
'filename' => $parsed_args['filename'],
|
||||
);
|
||||
|
||||
@ -312,7 +313,9 @@ class WP_Http_Curl {
|
||||
return $redirect_response;
|
||||
}
|
||||
|
||||
if ( true === $parsed_args['decompress'] && true === WP_Http_Encoding::should_decode( $theHeaders['headers'] ) ) {
|
||||
if ( true === $parsed_args['decompress']
|
||||
&& true === WP_Http_Encoding::should_decode( $processed_headers['headers'] )
|
||||
) {
|
||||
$theBody = WP_Http_Encoding::decompress( $theBody );
|
||||
}
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '5.9-alpha-51930';
|
||||
$wp_version = '5.9-alpha-51931';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
Loading…
Reference in New Issue
Block a user