Skip to:
Content

bbPress.org


Ignore:
Timestamp:
08/16/2015 12:42:10 PM (9 years ago)
Author:
netweb
Message:

Replies: Improve type-casting in bbp_update_reply_topic_id() missed in r5737

Props thebrandonallen. See #2801.

File:
1 edited

Legend:

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

    r5893 r5924  
    10931093            foreach ( $ancestors as $ancestor ) {
    10941094
    1095                 // Get first parent that is a forum
     1095                // Get first parent that is a topic
    10961096                if ( get_post_field( 'post_type', $ancestor ) === bbp_get_topic_post_type() ) {
    10971097                    $topic_id = $ancestor;
    10981098
    1099                     // Found a forum, so exit the loop and continue
     1099                    // Found a topic, so exit the loop and continue
    11001100                    continue;
    11011101                }
     
    11071107    $topic_id = bbp_update_topic_id( $reply_id, $topic_id );
    11081108
    1109     return apply_filters( 'bbp_update_reply_topic_id', $topic_id, $reply_id );
     1109    return (int) apply_filters( 'bbp_update_reply_topic_id', $topic_id, $reply_id );
    11101110}
    11111111
Note: See TracChangeset for help on using the changeset viewer.