Ticket #16137: 16137.patch

File 16137.patch, 668 bytes (added by SergeyBiryukov, 22 months ago)
  • wp-includes/functions.php

     
    31803180        $filtered = array(); 
    31813181 
    31823182        foreach ( $list as $key => $obj ) { 
    3183                 $matched = count( array_intersect_assoc( (array) $obj, $args ) ); 
     3183                $to_match = (array) $obj; 
     3184 
     3185                $matched = 0; 
     3186                foreach ( $args as $m_key => $m_value ) { 
     3187                        if ( $m_value == $to_match[$m_key] ) 
     3188                                $matched++; 
     3189                } 
     3190 
    31843191                if ( ( 'AND' == $operator && $matched == $count ) 
    31853192                  || ( 'OR' == $operator && $matched <= $count ) 
    31863193                  || ( 'NOT' == $operator && 0 == $matched ) ) {