Skip to:
Content

bbPress.org


Ignore:
Timestamp:
06/06/2014 07:38:59 PM (11 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
  • TabularUnified trunk/src/includes/replies/template.php ΒΆ

    r5372 r5378  
    24662466        // Get $_REQUEST data
    24672467        if ( isset( $_REQUEST['bbp_reply_to'] ) ) {
    2468             $reply_to = (int) $_REQUEST['bbp_reply_to'];
     2468            $reply_to = bbp_validate_reply_to( $_REQUEST['bbp_reply_to'] );
    24692469        }
    24702470
Note: See TracChangeset for help on using the changeset viewer.