WordPress.org

Make WordPress Core

Opened 4 years ago

Last modified 3 years ago

#16137 closed defect (bug)

wp_list_filter() is inexact when dealing with nested arrays — at Initial Version

Reported by: scribu Owned by:
Milestone: 3.3 Priority: normal
Severity: normal Version:
Component: General Keywords: has-patch
Focuses: Cc:

Description

To reproduce:

add_action('init', 'test_admin_notices', 11);
function test_admin_notices() {
    global $wp_taxonomies;
    print_r( wp_filter_object_list( array_values( $wp_taxonomies ), array( 'object_type' => array( 'post' ) ), 'and', 'object_type' ) );
}

Doing a manual loop instead of using array_intersect_assoc() fixes the problem.

Change History (1)

@scribu4 years ago

Note: See TracTickets for help on using tickets.