WordPress.org

Make WordPress Core

Changeset 51929


Ignore:
Timestamp:
10/24/2021 07:21:18 PM (3 months ago)
Author:
SergeyBiryukov
Message:

Coding Standards: Rename the $arrHeaders variable to $processed_headers in WP_Http_Streams::request().

This fixes a Variable "$arrHeaders" is not in valid snake_case format WPCS warning.

Follow-up to [8516], [51826].

See #53359.

File:
1 edited

Legend:

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

    r51850 r51929  
    317317        fclose( $handle );
    318318
    319         $arrHeaders = WP_Http::processHeaders( $process['headers'], $url );
     319        $processed_headers = WP_Http::processHeaders( $process['headers'], $url );
    320320
    321321        $response = array(
    322             'headers'  => $arrHeaders['headers'],
     322            'headers'  => $processed_headers['headers'],
    323323            // Not yet processed.
    324324            'body'     => null,
    325             'response' => $arrHeaders['response'],
    326             'cookies'  => $arrHeaders['cookies'],
     325            'response' => $processed_headers['response'],
     326            'cookies'  => $processed_headers['cookies'],
    327327            'filename' => $parsed_args['filename'],
    328328        );
     
    335335
    336336        // If the body was chunk encoded, then decode it.
    337         if ( ! empty( $process['body'] ) && isset( $arrHeaders['headers']['transfer-encoding'] )
    338             && 'chunked' === $arrHeaders['headers']['transfer-encoding']
     337        if ( ! empty( $process['body'] ) && isset( $processed_headers['headers']['transfer-encoding'] )
     338            && 'chunked' === $processed_headers['headers']['transfer-encoding']
    339339        ) {
    340340            $process['body'] = WP_Http::chunkTransferDecode( $process['body'] );
    341341        }
    342342
    343         if ( true === $parsed_args['decompress'] && true === WP_Http_Encoding::should_decode( $arrHeaders['headers'] ) ) {
     343        if ( true === $parsed_args['decompress'] && true === WP_Http_Encoding::should_decode( $processed_headers['headers'] ) ) {
    344344            $process['body'] = WP_Http_Encoding::decompress( $process['body'] );
    345345        }
Note: See TracChangeset for help on using the changeset viewer.