Skip to:
Content

bbPress.org

Changeset 4965


Ignore:
Timestamp:
05/28/2013 07:03:24 PM (12 years ago)
Author:
johnjamesjacoby
Message:

In bbp_update_reply_to(), allow $reply_to to be 0 and delete if it's being set to empty. See #2340.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/includes/replies/functions.php

    r4944 r4965  
    10701070        return;
    10711071
    1072     // Return if no reply to
    1073     if ( empty( $reply_to ) )
    1074         return;
    1075 
    10761072    // Set the reply to
    1077     update_post_meta( $reply_id, '_bbp_reply_to', $reply_to );
     1073    if ( !empty( $reply_to ) ) {
     1074        update_post_meta( $reply_id, '_bbp_reply_to', $reply_to );
     1075
     1076    // Delete the reply to
     1077    } else {
     1078        delete_post_meta( $reply_id, '_bbp_reply_to' );
     1079    }
    10781080
    10791081    return (int) apply_filters( 'bbp_update_reply_to', (int) $reply_to, $reply_id );
Note: See TracChangeset for help on using the changeset viewer.