Skip to:
Content

BuddyPress.org

Changeset 10869


Ignore:
Timestamp:
06/02/2016 02:18:17 AM (3 years ago)
Author:
r-a-y
Message:

Activity: Bail out of activity post functions if an error occurred.

See #6719.

File:
1 edited

Legend:

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

    r10860 r10869  
    19521952    ) );
    19531953
    1954     if ( is_wp_error( $activity_id ) ) {
     1954    // Bail on failure.
     1955    if ( false === $activity_id || is_wp_error( $activity_id ) ) {
    19551956        return $activity_id;
    19561957    }
     
    26162617    ) );
    26172618
    2618     // Return WP Error.
    2619     if ( is_wp_error( $comment_id ) && 'wp_error' === $r['error_type'] ) {
     2619    // Bail on failure.
     2620    if ( false === $comment_id || is_wp_error( $comment_id ) ) {
    26202621        return $comment_id;
    26212622    }
Note: See TracChangeset for help on using the changeset viewer.