From 13f85b4365bf7b14c38785489ae4a50da80cc8a8 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Tue, 13 Jun 2023 04:44:40 +0000 Subject: [PATCH] Coding Standards: Use strict comparison in `wp-includes/class-wp-list-util.php`. Follow-up to [18606], [38928], [48413]. Props aristath, poena, afercia, SergeyBiryukov. See #57839. git-svn-id: https://develop.svn.wordpress.org/trunk@55908 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/class-wp-list-util.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/wp-includes/class-wp-list-util.php b/src/wp-includes/class-wp-list-util.php index c394f2c613..8c1d897475 100644 --- a/src/wp-includes/class-wp-list-util.php +++ b/src/wp-includes/class-wp-list-util.php @@ -116,12 +116,12 @@ class WP_List_Util { foreach ( $args as $m_key => $m_value ) { if ( is_array( $obj ) ) { // Treat object as an array. - if ( array_key_exists( $m_key, $obj ) && ( $m_value == $obj[ $m_key ] ) ) { + if ( array_key_exists( $m_key, $obj ) && ( $m_value === $obj[ $m_key ] ) ) { $matched++; } } elseif ( is_object( $obj ) ) { // Treat object as an object. - if ( isset( $obj->{$m_key} ) && ( $m_value == $obj->{$m_key} ) ) { + if ( isset( $obj->{$m_key} ) && ( $m_value === $obj->{$m_key} ) ) { $matched++; } } @@ -276,7 +276,7 @@ class WP_List_Util { continue; } - if ( $a[ $field ] == $b[ $field ] ) { + if ( $a[ $field ] === $b[ $field ] ) { continue; }