- Timestamp:
- 03/29/2015 04:33:08 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-xprofile/classes/class-bp-xprofile-field.php
r9658 r9659 604 604 605 605 // Validate Form 606 if ( '' == $_POST['title'] || '' == $_POST['required'] || '' == $_POST['fieldtype']) {606 if ( empty( $_POST['title'] ) || ! isset( $_POST['required'] ) || empty( $_POST['fieldtype'] ) ) { 607 607 $message = __( 'Please make sure you fill out all required fields.', 'buddypress' ); 608 608 return false; … … 612 612 $option_name = "{$_POST['fieldtype']}_option"; 613 613 614 if ( $field_type->supports_options&& isset( $_POST[$option_name] ) && empty( $_POST[$option_name][1] ) ) {615 $message = __( 'This field type require at least one option. Please add options below.', 'buddypress' );614 if ( ! empty( $field_type->supports_options ) && isset( $_POST[$option_name] ) && empty( $_POST[$option_name][1] ) ) { 615 $message = __( 'This field type requires at least one option. Please add options below.', 'buddypress' ); 616 616 return false; 617 617 }
Note: See TracChangeset
for help on using the changeset viewer.