Skip to:
Content

BuddyPress.org

Ticket #6443: 6443.01.patch

File 6443.01.patch, 715 bytes (added by johnjamesjacoby, 10 years ago)
  • src/bp-xprofile/classes/class-bp-xprofile-field.php

     
    597597                        $field_type  = bp_xprofile_create_field_type( $_POST['fieldtype'] );
    598598                        $option_name = "{$_POST['fieldtype']}_option";
    599599
    600                         if ( ! empty( $field_type->supports_options ) && isset( $_POST[ $option_name ] ) && empty( $_POST[ $option_name ][1] ) ) {
     600                        if ( ! empty( $field_type->supports_options ) && ( ! isset( $_POST[ $option_name ] ) || ! isset( $_POST[ $option_name ][1] ) ) ) {
    601601                                $message = __( 'This field type requires at least one option. Please add options below.', 'buddypress' );
    602602                                return false;
    603603                        }