diff --git a/wp-includes/class-wp-list-util.php b/wp-includes/class-wp-list-util.php index a2b1f92969..6560355291 100644 --- a/wp-includes/class-wp-list-util.php +++ b/wp-includes/class-wp-list-util.php @@ -165,13 +165,9 @@ class WP_List_Util { */ foreach ( $this->output as $key => $value ) { if ( is_object( $value ) ) { - if ( property_exists( $value, $field ) ) { - $newlist[ $key ] = $value->$field; - } + $newlist[ $key ] = $value->$field; } elseif ( is_array( $value ) ) { - if ( array_key_exists( $field, $value ) ) { - $newlist[ $key ] = $value[ $field ]; - } + $newlist[ $key ] = $value[ $field ]; } else { _doing_it_wrong( __METHOD__, @@ -192,20 +188,16 @@ class WP_List_Util { */ foreach ( $this->output as $value ) { if ( is_object( $value ) ) { - if ( property_exists( $value, $field ) ) { - if ( property_exists( $value, $index_key ) ) { - $newlist[ $value->$index_key ] = $value->$field; - } else { - $newlist[] = $value->$field; - } + if ( isset( $value->$index_key ) ) { + $newlist[ $value->$index_key ] = $value->$field; + } else { + $newlist[] = $value->$field; } } elseif ( is_array( $value ) ) { - if ( array_key_exists( $field, $value ) ) { - if ( array_key_exists( $index_key, $value ) ) { - $newlist[ $value[ $index_key ] ] = $value[ $field ]; - } else { - $newlist[] = $value[ $field ]; - } + if ( isset( $value[ $index_key ] ) ) { + $newlist[ $value[ $index_key ] ] = $value[ $field ]; + } else { + $newlist[] = $value[ $field ]; } } else { _doing_it_wrong( diff --git a/wp-includes/version.php b/wp-includes/version.php index 44892913b1..9e7ee998a2 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.5-beta3-57731'; +$wp_version = '6.5-beta3-57732'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.