Check if array key exists in wp_list_filter(). props wpsmith. fixes #20929.
git-svn-id: https://develop.svn.wordpress.org/trunk@21184 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
1c4b08d998
commit
96f9446e11
@ -2402,7 +2402,7 @@ function wp_list_filter( $list, $args = array(), $operator = 'AND' ) {
|
||||
|
||||
$matched = 0;
|
||||
foreach ( $args as $m_key => $m_value ) {
|
||||
if ( $m_value == $to_match[ $m_key ] )
|
||||
if ( array_key_exists( $m_key, $to_match ) && $m_value == $to_match[ $m_key ] )
|
||||
$matched++;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user