WordPress.org

Make WordPress Core

Changeset 22445


Ignore:
Timestamp:
11/07/12 21:48:38 (2 years ago)
Author:
nacin
Message:

Fix meta value querying in wp_list_pages(). props SergeyBiryukov. fixes #20376.

File:
1 edited

Legend:

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

    r22386 r22445  
    36933693    $join = ''; 
    36943694    $where = "$exclusions $inclusions "; 
    3695     if ( ! empty( $meta_key ) || ! empty( $meta_value ) ) { 
     3695    if ( ! empty( $meta_key ) || isset( $meta_value ) ) { 
    36963696        $join = " LEFT JOIN $wpdb->postmeta ON ( $wpdb->posts.ID = $wpdb->postmeta.post_id )"; 
    36973697 
     
    37013701        if ( ! empty( $meta_key ) ) 
    37023702            $where .= $wpdb->prepare(" AND $wpdb->postmeta.meta_key = %s", $meta_key); 
    3703         if ( ! empty( $meta_value ) ) 
     3703        if ( isset( $meta_value ) ) 
    37043704            $where .= $wpdb->prepare(" AND $wpdb->postmeta.meta_value = %s", $meta_value); 
    37053705 
Note: See TracChangeset for help on using the changeset viewer.