diff --git a/src/wp-includes/rewrite.php b/src/wp-includes/rewrite.php index b76de4c136..647977cc20 100644 --- a/src/wp-includes/rewrite.php +++ b/src/wp-includes/rewrite.php @@ -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; }