Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
10/25/2016 09:15:19 PM (8 years ago)
Author:
djpaul
Message:

xprofile: fix regression being unable to select year in date field type.

Pre-2.7 date fields do not have all of the new field meta properties set, and the requested metas were returned as an empty string, not a boolean false. The type strictness of the check changed in this commit caused the value(s) of the year field to be set to an empty array, instead of picking up the range of dates from the defaults.

This was probably caused by some misleading PHPDoc for bp_xprofile_get_meta, which we're going to look into seperately.

Fixes #7300

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-xprofile/classes/class-bp-xprofile-field-type-datebox.php

    r11079 r11210  
    349349        foreach ( $defaults as $key => $value ) {
    350350            $saved = bp_xprofile_get_meta( $field_id, 'field', $key, true );
    351             if ( false !== $saved ) {
     351
     352            if ( $saved ) {
    352353                $settings[ $key ] = $saved;
    353354            } else {
Note: See TracChangeset for help on using the changeset viewer.