mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 14:20:15 +00:00
Coding Standards: Use strict comparison where trim() is involved.
Follow-up to [17189], [24623], [55642], [55652], [55653]. Props aristath, poena, afercia, SergeyBiryukov. See #57839. git-svn-id: https://develop.svn.wordpress.org/trunk@55654 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -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 ) {
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user