[buddypress-trac] [BuddyPress] #5083: Activity Meta doesn't recognize 0 as a valid value

buddypress-trac noreply at wordpress.org
Fri Jun 28 14:54:59 UTC 2013

#5083: Activity Meta doesn't recognize 0 as a valid value
 Reporter:  saurabhshukla  |      Owner:
     Type:  defect (bug)   |     Status:  new
 Priority:  normal         |  Milestone:  Awaiting Review
Component:  Core           |    Version:
 Severity:  normal         |   Keywords:
 A meta key not existing and a meta key with a value of 0 are two different
 things and this distinction can be useful at times.

 I attempted storing a privacy meta as 0 and I could never check for it. I
 wanted to distinguish between activities that have a deliberate privacy
 set to 0 and activities that never had any privacy set.

 Can't do that anyway I tried, so I had to set it as -1 which makes me do
 extra bending around. This is in contrast to how WordPress post meta is
 stored and retrieved.

 In fact I was mapping posts to activities and also mapping the
 corresponding metas.

 The empty() check in the meta functions is the culprit. Are we open to
 replace this approach with something else?

Ticket URL: <https://buddypress.trac.wordpress.org/ticket/5083>
BuddyPress <http://buddypress.org/>

More information about the buddypress-trac mailing list