Skip to content

Commit

Permalink
Coding Standards: Rename the $arrURL variable to $parsed_url in `…
Browse files Browse the repository at this point in the history
…WP_Http_Cookie::__construct()`.

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

Follow-up to [10509], [25044], [45667], [51823].

See #53359.

git-svn-id: https://develop.svn.wordpress.org/trunk@51824 602fd350-edb4-49c9-b593-d223f7449a82
  • Loading branch information
SergeyBiryukov committed Sep 19, 2021
1 parent be12fd2 commit 4d669c9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/wp-includes/class-wp-http-cookie.php
Expand Up @@ -93,12 +93,12 @@ class WP_Http_Cookie {
*/
public function __construct( $data, $requested_url = '' ) {
if ( $requested_url ) {
$arrURL = parse_url( $requested_url );
$parsed_url = parse_url( $requested_url );
}
if ( isset( $arrURL['host'] ) ) {
$this->domain = $arrURL['host'];
if ( isset( $parsed_url['host'] ) ) {
$this->domain = $parsed_url['host'];
}
$this->path = isset( $arrURL['path'] ) ? $arrURL['path'] : '/';
$this->path = isset( $parsed_url['path'] ) ? $parsed_url['path'] : '/';
if ( '/' !== substr( $this->path, -1 ) ) {
$this->path = dirname( $this->path ) . '/';
}
Expand Down

0 comments on commit 4d669c9

Please sign in to comment.