Skip to:
Content

BuddyPress.org

Opened 5 years ago

Closed 5 years ago

Last modified 3 years ago

#5685 closed defect (bug) (fixed)

Ton of notices in activity stream for type user_registered

Reported by: slaFFik Owned by: boonebgorges
Milestone: 2.1 Priority: normal
Severity: normal Version:
Component: Core Keywords:
Cc:

Description

I experimented with users registrations. While doing this I was not deleting user properly - using wp-admin area, but just deleting rows in wp_users and wp_usermeta. Each time the user was registered a new activity was recorded. I didn't clean them up.

After this on activity stream I see a lot of notices - activity item itself referencing a user by user_id that doesn't exist in the system and without checks tries to use user's data.

Notice: Undefined property: stdClass::$user_nicename in \wp-content\plugins\buddypress\bp-activity\bp-activity-template.php on line 1144

Notice: Undefined Property: Stdclass::$user_login in \wp-content\plugins\buddypress\bp-activity\bp-activity-template.php On Line 1144

I guess these properties should be checked before their use in the code.

Change History (3)

#1 @boonebgorges
5 years ago

  • Milestone changed from Awaiting Review to 2.1

#2 @boonebgorges
5 years ago

  • Owner set to boonebgorges
  • Resolution set to fixed
  • Status changed from new to closed

In 8477:

Check user properties before attempting to use in bp_get_activity_user_link()

This prevents PHP notices when users have been incompletely deleted from the DB.

Fixes #5685

#3 @DJPaul
3 years ago

  • Component changed from Tools - Warnings/Notices to Core
Note: See TracTickets for help on using tickets.