Make WordPress Core

Changeset 55908


Ignore:
Timestamp:
06/13/2023 04:44:40 AM (3 years ago)
Author:
SergeyBiryukov
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-list-util.php

    r55423 r55908  
    117117                                if ( is_array( $obj ) ) {
    118118                                        // Treat object as an array.
    119                                         if ( array_key_exists( $m_key, $obj ) && ( $m_value == $obj[ $m_key ] ) ) {
     119                                        if ( array_key_exists( $m_key, $obj ) && ( $m_value === $obj[ $m_key ] ) ) {
    120120                                                $matched++;
    121121                                        }
    122122                                } elseif ( is_object( $obj ) ) {
    123123                                        // Treat object as an object.
    124                                         if ( isset( $obj->{$m_key} ) && ( $m_value == $obj->{$m_key} ) ) {
     124                                        if ( isset( $obj->{$m_key} ) && ( $m_value === $obj->{$m_key} ) ) {
    125125                                                $matched++;
    126126                                        }
     
    277277                        }
    278278
    279                         if ( $a[ $field ] == $b[ $field ] ) {
     279                        if ( $a[ $field ] === $b[ $field ] ) {
    280280                                continue;
    281281                        }
Note: See TracChangeset for help on using the changeset viewer.