[buddypress-trac] [BuddyPress Trac] #5597: BP_Core_User::get_last_activity() returns incorrect result from cache

buddypress-trac noreply at wordpress.org
Mon Apr 28 22:20:52 UTC 2014


#5597: BP_Core_User::get_last_activity() returns incorrect result from cache
-----------------------------+-------------------------
 Reporter:  johnjamesjacoby  |      Owner:
     Type:  defect (bug)     |     Status:  new
 Priority:  normal           |  Milestone:  2.0.1
Component:  Core             |    Version:
 Severity:  normal           |   Keywords:  2nd-opinion
-----------------------------+-------------------------
 `BP_Core_User::get_last_activity()` returns either:

 * A multidimensional array keyed by user ID (for many users, or non-cached
 checks)
 * An array for one user with no user ID key (for cached checks)

 It causes problems with `BP_Core_User::update_last_activity()` because
 `$activity` is not always keyed the same, and has hardcoded checks for:

 * `'id' => $activity[ $user_id ]['activity_id']`
 * `$activity[ $user_id ]['date_recorded'] = $time;`

 Resulting in the following debug notice and failed query:

 `Notice: Undefined offset: 1 in /wp-content/plugins/buddypress/bp-core/bp-
 core-classes.php on line 1399`

--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/5597>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac


More information about the buddypress-trac mailing list