Skip to content

Commit

Permalink
Coding Standards: Rename the $requestPath variable to `$request_pat…
Browse files Browse the repository at this point in the history
…h` in `WP_Http_Streams::request()`.

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

Follow-up to [8516], [51825], [51929], [51940], [52960].

Props azouamauriac.
See #54728.

git-svn-id: https://develop.svn.wordpress.org/trunk@52961 602fd350-edb4-49c9-b593-d223f7449a82
  • Loading branch information
SergeyBiryukov committed Mar 20, 2022
1 parent aafc0ae commit ced5b7d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/wp-includes/class-wp-http-streams.php
Expand Up @@ -206,12 +206,12 @@ public function request( $url, $args = array() ) {
stream_set_timeout( $handle, $timeout, $utimeout );

if ( $proxy->is_enabled() && $proxy->send_through_proxy( $url ) ) { // Some proxies require full URL in this field.
$requestPath = $url;
$request_path = $url;
} else {
$requestPath = $parsed_url['path'] . ( isset( $parsed_url['query'] ) ? '?' . $parsed_url['query'] : '' );
$request_path = $parsed_url['path'] . ( isset( $parsed_url['query'] ) ? '?' . $parsed_url['query'] : '' );
}

$strHeaders = strtoupper( $parsed_args['method'] ) . ' ' . $requestPath . ' HTTP/' . $parsed_args['httpversion'] . "\r\n";
$strHeaders = strtoupper( $parsed_args['method'] ) . ' ' . $request_path . ' HTTP/' . $parsed_args['httpversion'] . "\r\n";

$include_port_in_host_header = (
( $proxy->is_enabled() && $proxy->send_through_proxy( $url ) )
Expand Down

0 comments on commit ced5b7d

Please sign in to comment.