Make WordPress Core

Changeset 56208


Ignore:
Timestamp:
07/11/2023 11:13:30 AM (20 months ago)
Author:
SergeyBiryukov
Message:

Coding Standards: Use strict comparison in wp-includes/rewrite.php.

Follow-up to [6614], [13689], [19743].

Props aristath, poena, afercia, SergeyBiryukov.
See #57839.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/rewrite.php

    r56194 r56208  
    211211        $args = array( 'with_front' => $args );
    212212    }
    213     if ( func_num_args() == 4 ) {
     213
     214    if ( func_num_args() === 4 ) {
    214215        $args['ep_mask'] = func_get_arg( 3 );
    215216    }
     
    603604         * prepend it to the path info.
    604605         */
    605         if ( ! empty( $url ) && ( $url != $request ) && str_starts_with( $match, $url ) ) {
     606        if ( ! empty( $url ) && ( $url !== $request ) && str_starts_with( $match, $url ) ) {
    606607            $request_match = $url . '/' . $request;
    607608        }
Note: See TracChangeset for help on using the changeset viewer.