Make WordPress Core


Ignore:
Timestamp:
09/19/2021 04:58:43 PM (4 years ago)
Author:
SergeyBiryukov
Message:

Coding Standards: Rename the $arrURL variable to $parsed_url in 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.

File:
1 edited

Legend:

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

    r51822 r51824  
    9494    public function __construct( $data, $requested_url = '' ) {
    9595        if ( $requested_url ) {
    96             $arrURL = parse_url( $requested_url );
    97         }
    98         if ( isset( $arrURL['host'] ) ) {
    99             $this->domain = $arrURL['host'];
    100         }
    101         $this->path = isset( $arrURL['path'] ) ? $arrURL['path'] : '/';
     96            $parsed_url = parse_url( $requested_url );
     97        }
     98        if ( isset( $parsed_url['host'] ) ) {
     99            $this->domain = $parsed_url['host'];
     100        }
     101        $this->path = isset( $parsed_url['path'] ) ? $parsed_url['path'] : '/';
    102102        if ( '/' !== substr( $this->path, -1 ) ) {
    103103            $this->path = dirname( $this->path ) . '/';
Note: See TracChangeset for help on using the changeset viewer.