From b30c9f51c03a803d11570899ee0ce748d10b26fb Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Sun, 20 Mar 2022 16:12:06 +0000 Subject: [PATCH] Coding Standards: Rename the `$theBody` variable to `$body` in `WP_Http_Curl::request()`. This fixes a `Variable "$theBody" is not in valid snake_case format` WPCS warning. Follow-up to [8516], [51825], [51929], [51931], [51940], [52025], [52960], [52961], [52962], [52963], [52964]. Props azouamauriac. See #54728. Built from https://develop.svn.wordpress.org/trunk@52965 git-svn-id: http://core.svn.wordpress.org/trunk@52554 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/class-wp-http-curl.php | 8 ++++---- wp-includes/version.php | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/wp-includes/class-wp-http-curl.php b/wp-includes/class-wp-http-curl.php index e36aa71c08..9194f2f20d 100644 --- a/wp-includes/class-wp-http-curl.php +++ b/wp-includes/class-wp-http-curl.php @@ -258,7 +258,7 @@ class WP_Http_Curl { curl_exec( $handle ); $processed_headers = WP_Http::processHeaders( $this->headers, $url ); - $theBody = $this->body; + $body = $this->body; $bytes_written_total = $this->bytes_written_total; $this->headers = ''; @@ -268,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( $processed_headers['headers'] ) ) ) { + if ( $curl_error || ( 0 == strlen( $body ) && 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'] ) { @@ -316,10 +316,10 @@ class WP_Http_Curl { if ( true === $parsed_args['decompress'] && true === WP_Http_Encoding::should_decode( $processed_headers['headers'] ) ) { - $theBody = WP_Http_Encoding::decompress( $theBody ); + $body = WP_Http_Encoding::decompress( $body ); } - $response['body'] = $theBody; + $response['body'] = $body; return $response; } diff --git a/wp-includes/version.php b/wp-includes/version.php index d9ffb1d138..04f68e8b1e 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.0-alpha-52964'; +$wp_version = '6.0-alpha-52965'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.