Make WordPress Core

Ticket #18092: 18092.diff

File 18092.diff, 612 bytes (added by kevinB, 13 years ago)

wp_list_filter() : OR operator was broken

  • wp-includes/functions.php

     
    31823182        foreach ( $list as $key => $obj ) {
    31833183                $matched = count( array_intersect_assoc( (array) $obj, $args ) );
    31843184                if ( ( 'AND' == $operator && $matched == $count )
    3185                   || ( 'OR' == $operator && $matched <= $count )
    3186                   || ( 'NOT' == $operator && 0 == $matched ) ) {
     3185                  || ( 'OR' == $operator && $matched )
     3186                  || ( 'NOT' == $operator && ! $matched ) ) {
    31873187                        $filtered[$key] = $obj;
    31883188                }
    31893189        }