Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
05/12/2016 06:53:35 PM (8 years ago)
Author:
djpaul
Message:

Core: when deleting a user's last_activity value, make sure it exists.

Creating a user in wp-admin then immediately deleting it was causing a
"doing it wrong" error because the last_activity value was null,
causing WPDB's delete and prepare methods to fail.

Fixes #6981

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-core/classes/class-bp-core-user.php

    r10425 r10749  
    935935        $existing = self::get_last_activity( $user_id );
    936936
    937         if ( empty( $existing ) ) {
     937        if ( empty( $existing ) || empty( $existing[ $user_id ]['activity_id'] ) ) {
    938938            return false;
    939939        }
Note: See TracChangeset for help on using the changeset viewer.