[buddypress-trac] [BuddyPress Trac] #9290: ERROR THROWN "NEW TOP 10!"

buddypress-trac noreply at wordpress.org
Wed Jun 4 07:42:58 UTC 2025


#9290: ERROR THROWN "NEW TOP 10!"
--------------------------+------------------------------
 Reporter:  potcus        |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Core          |     Version:
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |
--------------------------+------------------------------
Changes (by prbot):

 * keywords:   => has-patch


Comment:

 ''This ticket was mentioned in
 [https://github.com/buddypress/buddypress/pull/412 PR #412] on
 [https://github.com/buddypress/buddypress/ buddypress/buddypress] by
 [https://profiles.wordpress.org/rollybueno/ @rollybueno].''
 The exists() method was attempting to convert a WP_Error object to a
 string when
 checking for profile data existence. This fix:

 1. Initializes $retval as false by default
 2. Properly handles WP_Error and empty results from database queries
 3. Ensures consistent boolean return value throughout the method
 4. Removes unnecessary boolean casting in apply_filters_ref_array

 This prevents the "Object of class WP_Error could not be converted to
 string" error
 while maintaining the expected boolean return value of the exists()
 method.

 Trac ticket: https://buddypress.trac.wordpress.org/ticket/9290

-- 
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/9290#comment:1>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac


More information about the buddypress-trac mailing list