Make WordPress Core

Changeset 51931


Ignore:
Timestamp:
10/25/2021 04:18:26 PM (3 years ago)
Author:
SergeyBiryukov
Message:

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.

File:
1 edited

Legend:

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

    r51850 r51931  
    257257
    258258        curl_exec( $handle );
    259         $theHeaders          = WP_Http::processHeaders( $this->headers, $url );
     259
     260        $processed_headers   = WP_Http::processHeaders( $this->headers, $url );
    260261        $theBody             = $this->body;
    261262        $bytes_written_total = $this->bytes_written_total;
     
    268269
    269270        // If an error occurred, or, no response.
    270         if ( $curl_error || ( 0 == strlen( $theBody ) && empty( $theHeaders['headers'] ) ) ) {
     271        if ( $curl_error || ( 0 == strlen( $theBody ) && empty( $processed_headers['headers'] ) ) ) {
    271272            if ( CURLE_WRITE_ERROR /* 23 */ == $curl_error ) {
    272273                if ( ! $this->max_body_length || $this->max_body_length != $bytes_written_total ) {
     
    300301
    301302        $response = array(
    302             'headers'  => $theHeaders['headers'],
     303            'headers'  => $processed_headers['headers'],
    303304            'body'     => null,
    304             'response' => $theHeaders['response'],
    305             'cookies'  => $theHeaders['cookies'],
     305            'response' => $processed_headers['response'],
     306            'cookies'  => $processed_headers['cookies'],
    306307            'filename' => $parsed_args['filename'],
    307308        );
     
    313314        }
    314315
    315         if ( true === $parsed_args['decompress'] && true === WP_Http_Encoding::should_decode( $theHeaders['headers'] ) ) {
     316        if ( true === $parsed_args['decompress']
     317            && true === WP_Http_Encoding::should_decode( $processed_headers['headers'] )
     318        ) {
    316319            $theBody = WP_Http_Encoding::decompress( $theBody );
    317320        }
Note: See TracChangeset for help on using the changeset viewer.