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

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

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

git-svn-id: https://develop.svn.wordpress.org/trunk@56208 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov 2023-07-11 11:13:30 +00:00
parent 4e864a1ded
commit 31fdf8f20b

View File

@ -210,7 +210,8 @@ function add_permastruct( $name, $struct, $args = array() ) {
if ( ! is_array( $args ) ) {
$args = array( 'with_front' => $args );
}
if ( func_num_args() == 4 ) {
if ( func_num_args() === 4 ) {
$args['ep_mask'] = func_get_arg( 3 );
}
@ -602,7 +603,7 @@ function url_to_postid( $url ) {
* If the requesting file is the anchor of the match,
* prepend it to the path info.
*/
if ( ! empty( $url ) && ( $url != $request ) && str_starts_with( $match, $url ) ) {
if ( ! empty( $url ) && ( $url !== $request ) && str_starts_with( $match, $url ) ) {
$request_match = $url . '/' . $request;
}