From e6ba58cb68554f08cd7c1d6934fe1b77c5792e41 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Sun, 24 Oct 2021 19:21:18 +0000 Subject: [PATCH] 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. git-svn-id: https://develop.svn.wordpress.org/trunk@51929 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/class-wp-http-streams.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/wp-includes/class-wp-http-streams.php b/src/wp-includes/class-wp-http-streams.php index d6cfc5335930..abf16dd44d2e 100644 --- a/src/wp-includes/class-wp-http-streams.php +++ b/src/wp-includes/class-wp-http-streams.php @@ -316,14 +316,14 @@ public function request( $url, $args = array() ) { fclose( $handle ); - $arrHeaders = WP_Http::processHeaders( $process['headers'], $url ); + $processed_headers = WP_Http::processHeaders( $process['headers'], $url ); $response = array( - 'headers' => $arrHeaders['headers'], + 'headers' => $processed_headers['headers'], // Not yet processed. 'body' => null, - 'response' => $arrHeaders['response'], - 'cookies' => $arrHeaders['cookies'], + 'response' => $processed_headers['response'], + 'cookies' => $processed_headers['cookies'], 'filename' => $parsed_args['filename'], ); @@ -334,13 +334,13 @@ public function request( $url, $args = array() ) { } // If the body was chunk encoded, then decode it. - if ( ! empty( $process['body'] ) && isset( $arrHeaders['headers']['transfer-encoding'] ) - && 'chunked' === $arrHeaders['headers']['transfer-encoding'] + if ( ! empty( $process['body'] ) && isset( $processed_headers['headers']['transfer-encoding'] ) + && 'chunked' === $processed_headers['headers']['transfer-encoding'] ) { $process['body'] = WP_Http::chunkTransferDecode( $process['body'] ); } - if ( true === $parsed_args['decompress'] && true === WP_Http_Encoding::should_decode( $arrHeaders['headers'] ) ) { + if ( true === $parsed_args['decompress'] && true === WP_Http_Encoding::should_decode( $processed_headers['headers'] ) ) { $process['body'] = WP_Http_Encoding::decompress( $process['body'] ); }