Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
03/26/2014 08:04:37 PM (11 years ago)
Author:
djpaul
Message:

xProfile: adjust the xprofile_sanitize_data_value_before_save function to return the passed value instead of null if that value is empty().

This is currently preventing numeric zeroes as being stored as a field value, which is required for ticket #5220.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-xprofile/bp-xprofile-filters.php

    r8027 r8163  
    7474
    7575/**
    76  * xprofile_sanitize_data_value_before_save ( $field_value, $field_id )
    77  *
    7876 * Safely runs profile field data through kses and force_balance_tags.
    7977 *
     
    8684
    8785    // Return if empty
    88     if ( empty( $field_value ) )
    89         return;
     86    if ( empty( $field_value ) ) {
     87        return $field_value;
     88    }
    9089
    9190    // Value might be serialized
Note: See TracChangeset for help on using the changeset viewer.