Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
11/15/2013 09:08:20 PM (11 years ago)
Author:
boonebgorges
Message:

Allow 0 to be stored in activitymeta

Previously, any value where empty( $value ) evaluated to true would result
in the deletion of the row. This change allows for 0 to be stored as a
legitimate value.

This is a stopgap until BP's meta functions are refactored to use WP's core
*_metadata() functions.

Fixes #5083

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-activity/bp-activity-functions.php

    r7570 r7576  
    747747    $meta_value = maybe_serialize( $meta_value );
    748748
    749     // If value is empty, delete the meta key
    750     if ( empty( $meta_value ) )
     749    // If value is false, delete the meta key
     750    if ( false === $meta_value )
    751751        return bp_activity_delete_meta( $activity_id, $meta_key );
    752752
Note: See TracChangeset for help on using the changeset viewer.