Make WordPress Core

Changeset 52965


Ignore:
Timestamp:
03/20/2022 04:10:22 PM (3 years ago)
Author:
SergeyBiryukov
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-http-curl.php

    r52026 r52965  
    259259
    260260        $processed_headers   = WP_Http::processHeaders( $this->headers, $url );
    261         $theBody             = $this->body;
     261        $body                = $this->body;
    262262        $bytes_written_total = $this->bytes_written_total;
    263263
     
    269269
    270270        // If an error occurred, or, no response.
    271         if ( $curl_error || ( 0 == strlen( $theBody ) && empty( $processed_headers['headers'] ) ) ) {
     271        if ( $curl_error || ( 0 == strlen( $body ) && empty( $processed_headers['headers'] ) ) ) {
    272272            if ( CURLE_WRITE_ERROR /* 23 */ == $curl_error ) {
    273273                if ( ! $this->max_body_length || $this->max_body_length != $bytes_written_total ) {
     
    317317            && true === WP_Http_Encoding::should_decode( $processed_headers['headers'] )
    318318        ) {
    319             $theBody = WP_Http_Encoding::decompress( $theBody );
    320         }
    321 
    322         $response['body'] = $theBody;
     319            $body = WP_Http_Encoding::decompress( $body );
     320        }
     321
     322        $response['body'] = $body;
    323323
    324324        return $response;
Note: See TracChangeset for help on using the changeset viewer.