Skip to:
Content

bbPress.org


Ignore:
Timestamp:
06/06/2014 07:38:59 PM (10 years ago)
Author:
johnjamesjacoby
Message:

Introduce bbp_validate_reply_to() function, used to:

  • Validate a parent reply is actually a reply post_type.
  • A reply is not accidentally assigning itself as its own parent.
  • An integer is returned.

Fixes hiesenbug where calls to bbp_get_reply_id() were unexpectedly and occasionally returning the current reply ID rather than 0.

See #2588. (trunk)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/includes/topics/functions.php

    r5338 r5378  
    16731673
    16741674            // New topic from reply can't be a reply to
    1675             if ( ( $from_reply->ID === $destination_topic->ID && $from_reply->ID === $reply_to ) ) {
     1675            if ( ( $from_reply->ID === $destination_topic->ID ) && ( $from_reply->ID === $reply_to ) ) {
    16761676                bbp_update_reply_to( $reply->ID, 0 );
    16771677            }
Note: See TracChangeset for help on using the changeset viewer.