Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
11/03/2011 07:50:07 PM (13 years ago)
Author:
boonebgorges
Message:

Don't allow date-formatted xprofile fields to be saved if they're only partially filled in. Fixes #3630

File:
1 edited

Legend:

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

    r5131 r5268  
    6666            if ( !isset( $_POST['field_' . $field_id] ) ) {
    6767
    68                 if ( !empty( $_POST['field_' . $field_id . '_day'] ) && is_numeric( $_POST['field_' . $field_id . '_day'] ) ) {
     68                if ( !empty( $_POST['field_' . $field_id . '_day'] ) && !empty( $_POST['field_' . $field_id . '_month'] ) && !empty( $_POST['field_' . $field_id . '_year'] ) ) {
    6969                    // Concatenate the values
    7070                    $date_value =   $_POST['field_' . $field_id . '_day'] . ' ' . $_POST['field_' . $field_id . '_month'] . ' ' . $_POST['field_' . $field_id . '_year'];
Note: See TracChangeset for help on using the changeset viewer.