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
This commit is contained in:
Sergey Biryukov 2023-04-17 17:01:24 +00:00
parent 800b2b4261
commit 0e7e4ef0d5
3 changed files with 4 additions and 4 deletions

View File

@ -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 ) {

View File

@ -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;
}

View File

@ -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.