Make WordPress Core

Opened 7 years ago

Last modified 7 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:


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)

7 years ago

Note: See TracTickets for help on using tickets.