Skip to:
Content

bbPress.org

Opened 7 weeks ago

Closed 7 weeks ago

#3440 closed defect (bug) (fixed)

PHP notice when trying to link to recently deleted user

Reported by: johnjamesjacoby Owned by: johnjamesjacoby
Milestone: 2.6.7 Priority: normal
Severity: normal Version: 2.0
Component: Component - Users Keywords: commit
Cc:

Description

Trying to get property 'display_name' of non-object in /wp-content/plugins/bbpress/includes/users/template.php:448

Attachments (1)

3440.patch (3.1 KB) - added by johnjamesjacoby 7 weeks ago.

Download all attachments as: .zip

Change History (3)

#1 @johnjamesjacoby
7 weeks ago

In 7213:

Users: add some error checking to get_userdata() calls in profile link functions.

This change ensures that when attempting to link to user profiles when the display_name is the inner HTML of the link, that the "Anonymous" alternate is used whenever the user cannot be found.

It also bails early – returning false – if the user account simply does not exist, consistent with upstream calls to bbp_get_user_id(). (Functions calling these functions have a responsibility to appropriately handle boolean return values.)

In branches/2.6, for 2.6.7.

See #3440.

#2 @johnjamesjacoby
7 weeks ago

  • Resolution set to fixed
  • Status changed from assigned to closed

In 7214:

Users: add some error checking to get_userdata() calls in profile link functions.

This change ensures that when attempting to link to user profiles when the display_name is the inner HTML of the link, that the "Anonymous" alternate is used whenever the user cannot be found.

It also bails early – returning false – if the user account simply does not exist, consistent with upstream calls to bbp_get_user_id(). (Functions calling these functions have a responsibility to appropriately handle boolean return values.)

In trunk, for 2.7.

Fixes #3440.

Note: See TracTickets for help on using tickets.