Skip to:

Opened 4 weeks ago

Last modified 6 days ago

#3402 new defect

PHP Notice when calling bbp_get_user_nicename() for non-existent users

Reported by: dd32 Owned by:
Milestone: 2.6.6 Priority: normal
Severity: normal Version:
Component: Component - Users Keywords: has-patch


Most bbPress functions seem to handle a non-existent user being passed ok, but bbp_get_user_nicename() is not one of them.

PHP Notice: Trying to get property 'user_nicename' of non-object

The function seems to be designed with the idea that the user might not exist, but it still fails to handle it properly.

See attached patch, which returns false when the userdata can't be found, similar to passing a user_id of 0.

Attachments (1)

3402.diff (1.1 KB) - added by dd32 4 weeks ago.

Download all attachments as: .zip

Change History (2)

4 weeks ago

#1 @netweb
6 days ago

  • Milestone changed from Awaiting Review to 2.6.6
Note: See TracTickets for help on using tickets.