Make WordPress Core

Changeset 21184


Ignore:
Timestamp:
06/29/2012 07:42:27 PM (12 years ago)
Author:
nacin
Message:

Check if array key exists in wp_list_filter(). props wpsmith. fixes #20929.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/functions.php

    r21181 r21184  
    24032403        $matched = 0;
    24042404        foreach ( $args as $m_key => $m_value ) {
    2405             if ( $m_value == $to_match[ $m_key ] )
     2405            if ( array_key_exists( $m_key, $to_match ) && $m_value == $to_match[ $m_key ] )
    24062406                $matched++;
    24072407        }
Note: See TracChangeset for help on using the changeset viewer.