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

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


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

Comment (by imath):

 In [changeset:"13427" 13427]:
 {{{
 #!CommitTicketReference repository="" revision="13427"
 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

 See #8844 (trunk)
 Closes https://github.com/buddypress/buddypress/pull/68
 }}}

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


More information about the buddypress-trac mailing list