[buddypress-trac] [BuddyPress Trac] #8844: BP_Friends_Friendship::get_random_friends() reports incorrect results

buddypress-trac noreply at wordpress.org
Thu Feb 23 00:43:21 UTC 2023


#8844: BP_Friends_Friendship::get_random_friends() reports incorrect results
--------------------------------------+---------------------
 Reporter:  boonebgorges              |       Owner:  imath
     Type:  defect (bug)              |      Status:  closed
 Priority:  normal                    |   Milestone:  11.2.0
Component:  Friends                   |     Version:  11.0.0
 Severity:  normal                    |  Resolution:  fixed
 Keywords:  has-patch has-unit-tests  |
--------------------------------------+---------------------
Changes (by imath):

 * status:  reopened => closed
 * resolution:   => fixed


Comment:

 In [changeset:"13430" 13430]:
 {{{
 #!CommitTicketReference repository="" revision="13430"
 Improve comparison consistency in `BP_Friends_Friendship`

 - Fix a bug introduced in [13092] making sure to cast IDs retrieved by
 `$wpdb->results()` as integers when comparing them to another integer
 (user ID).
 - Use strong comparisons everywhere in the class.
 - Add unit tests.

 Props boonebgorges

 Fixes #8844 (branch 11.0)
 }}}

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


More information about the buddypress-trac mailing list