Skip to:
Content

bbPress.org

Changeset 6182


Ignore:
Timestamp:
12/27/2016 06:16:10 PM (5 years ago)
Author:
johnjamesjacoby
Message:

Tools: Explicitly pass false into add_post_meta()'s $unique parameter.

Though it's the default, we can't make any mistake that meta-key's to be non-unique for this to function correctly.

See #2959.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/includes/admin/tools.php

    r6181 r6182  
    22462246        // Add user ID to all favorited posts
    22472247        foreach ( $post_ids as $post_id ) {
    2248             $added = add_post_meta( $post_id, '_bbp_favorite', $meta->user_id );
     2248            $added = add_post_meta( $post_id, '_bbp_favorite', $meta->user_id, false );
    22492249
    22502250            // Bump counts if successfully added
     
    23022302        // Add user ID to all favorited posts
    23032303        foreach ( $post_ids as $post_id ) {
    2304             $added = add_post_meta( $post_id, '_bbp_subscription', $meta->user_id );
     2304            $added = add_post_meta( $post_id, '_bbp_subscription', $meta->user_id, false );
    23052305
    23062306            // Bump counts if successfully added
Note: See TracChangeset for help on using the changeset viewer.