Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
11/10/2023 02:09:10 AM (2 years ago)
Author:
imath
Message:

Make Activity loop reliable when post & activity comments are synced

As the $action key of the bp_has_activities() function arguments array accepts a string, a boolean as well as an array, we need to make sure the bp_blogs_new_blog_comment_query_backpat() function doesn't trigger an error when an array of activity type is passed.

Props btwebdesign, magland, teeboy4real

Fixes #9010
Closes https://github.com/buddypress/buddypress/pull/190

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-blogs/bp-blogs-activity.php

    r13476 r13642  
    10301030    $bp = buddypress();
    10311031
    1032     // If activity comments are disabled for blog posts, stop now!
    1033     if ( bp_disable_blogforum_comments() ) {
     1032    // If activity comments are disabled for blog posts or if the action is not a string, stop now!
     1033    if ( bp_disable_blogforum_comments() || ! is_string( $args['action'] ) ) {
    10341034        return $args;
    10351035    }
Note: See TracChangeset for help on using the changeset viewer.