Make WordPress Core


Ignore:
Timestamp:
09/18/2021 07:54:30 PM (4 years ago)
Author:
SergeyBiryukov
Message:

Coding Standards: Use strict comparison in wp-inclues/class-wp-http-cookie.php.

Follow-up to [10512].

See #53359.

File:
1 edited

Legend:

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

    r48576 r51822  
    188188        // Host - very basic check that the request URL ends with the domain restriction (minus leading dot).
    189189        $domain = ( '.' === substr( $domain, 0, 1 ) ) ? substr( $domain, 1 ) : $domain;
    190         if ( substr( $url['host'], -strlen( $domain ) ) != $domain ) {
     190        if ( substr( $url['host'], -strlen( $domain ) ) !== $domain ) {
    191191            return false;
    192192        }
     
    198198
    199199        // Path - request path must start with path restriction.
    200         if ( substr( $url['path'], 0, strlen( $path ) ) != $path ) {
     200        if ( substr( $url['path'], 0, strlen( $path ) ) !== $path ) {
    201201            return false;
    202202        }
Note: See TracChangeset for help on using the changeset viewer.