[buddypress-trac] [BuddyPress Trac] #5705: bp_group_is_user_banned() doesn't reference the group loop's "is_banned" value properly

buddypress-trac noreply at wordpress.org
Fri Jun 13 19:44:58 UTC 2014


#5705: bp_group_is_user_banned()  doesn't reference the group loop's "is_banned"
value properly
-------------------------+------------------
 Reporter:  r-a-y        |       Owner:
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  2.1
Component:  Groups       |     Version:  1.2
 Severity:  normal       |  Resolution:
 Keywords:  has-patch    |
-------------------------+------------------

Comment (by boonebgorges):

 Patch looks good to me.

 > My question is do we want to force bp_group_is_user_banned() to return a
 boolean or a string of the integer at all times? What about those that do
 strict conditional type checking?

 It really seems like this function, and others like it, should be
 returning booleans. I would suggest making that change. It's highly
 unlikely anyone's doing strict checking with this function (if you tried,
 you'd end up discovering how weird the return values are, and you'd go
 back to loose checks). May be worth noting in the inline docs that return
 values were changed, on the off chance it does break something and a dev
 does a stack trace to debug.

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


More information about the buddypress-trac mailing list