Skip to:
Content

BuddyPress.org

Ticket #7300: 7300.diff

File 7300.diff, 845 bytes (added by DJPaul, 8 years ago)
  • src/bp-xprofile/classes/class-bp-xprofile-field-type-datebox.php

    diff --git a/src/bp-xprofile/classes/class-bp-xprofile-field-type-datebox.php b/src/bp-xprofile/classes/class-bp-xprofile-field-type-datebox.php
    index 087fdb5..8253331 100644
    a b class BP_XProfile_Field_Type_Datebox extends BP_XProfile_Field_Type { 
    347347
    348348                $settings = array();
    349349                foreach ( $defaults as $key => $value ) {
    350                         $saved = bp_xprofile_get_meta( $field_id, 'field', $key, true );
    351                         if ( false !== $saved ) {
    352                                 $settings[ $key ] = $saved;
    353                         } else {
    354                                 $settings[ $key ] = $value;
    355                         }
     350                        $saved            = bp_xprofile_get_meta( $field_id, 'field', $key, true );
     351                        $settings[ $key ] = $saved ?: $value;
    356352                }
    357353
    358354                $settings = self::validate_settings( $settings );