[buddypress-trac] [BuddyPress Trac] #6977: Audit all DB fetch methods to return integers where appropriate

buddypress-trac noreply at wordpress.org
Wed Mar 23 23:38:59 UTC 2016


#6977: Audit all DB fetch methods to return integers where appropriate
---------------------------------+------------------------------
 Reporter:  r-a-y                |       Owner:
     Type:  enhancement          |      Status:  new
 Priority:  normal               |   Milestone:  Awaiting Review
Component:  Component - Any/All  |     Version:
 Severity:  normal               |  Resolution:
 Keywords:  dev-feedback         |
---------------------------------+------------------------------

Comment (by r-a-y):

 Thanks for the feedback, @boonebgorges!

 > 6977.BP_Friends_Friendship.patch​ will mean that a failed lookup results
 in a BP_Friends_Friendship object where, eg, initiator_user_id is null.

 How are you checking for a failed lookup?  `$f = new
 BP_Friends_Friendship( 0 )`?

 If so, `$f->initiator_user_id` will always return `null` with or without
 the patch.

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


More information about the buddypress-trac mailing list