[buddypress-trac] [BuddyPress] #3139: groups_update_groupmeta() should accept 0 as meta value

buddypress-trac at lists.automattic.com buddypress-trac at lists.automattic.com
Mon Nov 28 13:32:25 UTC 2011


#3139: groups_update_groupmeta() should accept 0 as meta value
--------------------------+------------------
 Reporter:  calvin_42     |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  1.6
Component:  Groups        |     Version:
 Severity:  normal        |  Resolution:
 Keywords:                |
--------------------------+------------------
Changes (by boonebgorges):

 * severity:   => normal


Comment:

 I've done a sweep through all core uses of groups_get_groupmeta(), to make
 sure that none of them would be messed up if we allowed the return value
 of groups_get_groupmeta() to be 0 rather than an empty string. There was
 only one place where, in a few bizarre edge cases, a problem might have
 arisen (having to do with the creation of groups, and checking {{{'' ==}}}
 instead of {{{empty()}}}.

 The greater risk is in terms of plugins using groups_update_groupmeta()
 and groups_get_groupmeta(), but even then it's very much an edge case,
 since there will only be a problem if a plugin is doing strict type
 checking (like {{{'' === groups_get_groupmeta()}}})

 Let's keep an eye on this as the dev cycle proceeds. I don't anticipate
 any problems.

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


More information about the buddypress-trac mailing list