Skip to:
Content

BuddyPress.org

Changeset 7845


Ignore:
Timestamp:
02/11/2014 03:01:20 PM (11 years ago)
Author:
boonebgorges
Message:

Fix incorrect $wpdb->prepare() use in bp_update_meta_cache().

Fixes #5388

Props imath

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-core/bp-core-cache.php

    r7843 r7845  
    212212    // Get meta info
    213213    if ( ! empty( $uncached_ids ) ) {
    214         $id_list   = join( ',', $object_ids );
    215         $meta_list = $wpdb->get_results( $wpdb->prepare( "SELECT {$object_column}, meta_key, meta_value FROM {$meta_table} WHERE {$object_column} IN ($id_list)", $object_type ), ARRAY_A );
     214        $id_list   = join( ',', wp_parse_id_list( $uncached_ids ) );
     215        $meta_list = $wpdb->get_results( esc_sql( "SELECT {$object_column}, meta_key, meta_value FROM {$meta_table} WHERE {$object_column} IN ({$id_list})" ), ARRAY_A );
    216216
    217217        if ( ! empty( $meta_list ) ) {
Note: See TracChangeset for help on using the changeset viewer.