From 0e7e4ef0d5f12e2e9f17952211d4ba650d6b3dfb Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Mon, 17 Apr 2023 17:01:24 +0000 Subject: [PATCH] Coding Standards: Use strict comparison where `trim()` is involved. Follow-up to [17189], [24623], [55642], [55652], [55653]. Props aristath, poena, afercia, SergeyBiryukov. See #57839. Built from https://develop.svn.wordpress.org/trunk@55654 git-svn-id: http://core.svn.wordpress.org/trunk@55166 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/class-wp-user-query.php | 4 ++-- wp-includes/class-wp-xmlrpc-server.php | 2 +- wp-includes/version.php | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/wp-includes/class-wp-user-query.php b/wp-includes/class-wp-user-query.php index 8fc1564bef..446cc746fa 100644 --- a/wp-includes/class-wp-user-query.php +++ b/wp-includes/class-wp-user-query.php @@ -689,8 +689,8 @@ class WP_User_Query { } if ( $search ) { - $leading_wild = ( ltrim( $search, '*' ) != $search ); - $trailing_wild = ( rtrim( $search, '*' ) != $search ); + $leading_wild = ( ltrim( $search, '*' ) !== $search ); + $trailing_wild = ( rtrim( $search, '*' ) !== $search ); if ( $leading_wild && $trailing_wild ) { $wild = 'both'; } elseif ( $leading_wild ) { diff --git a/wp-includes/class-wp-xmlrpc-server.php b/wp-includes/class-wp-xmlrpc-server.php index 1220a5c69b..96961d0620 100644 --- a/wp-includes/class-wp-xmlrpc-server.php +++ b/wp-includes/class-wp-xmlrpc-server.php @@ -5662,7 +5662,7 @@ class wp_xmlrpc_server extends IXR_Server { if ( $enclosures ) { foreach ( $enclosures as $enc ) { // This method used to omit the trailing new line. #23219 - if ( rtrim( $enc, "\n" ) == rtrim( $encstring, "\n" ) ) { + if ( rtrim( $enc, "\n" ) === rtrim( $encstring, "\n" ) ) { $found = true; break; } diff --git a/wp-includes/version.php b/wp-includes/version.php index 21ebfc59ca..c8c2ee3349 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.3-alpha-55653'; +$wp_version = '6.3-alpha-55654'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.