- Timestamp:
- 02/21/2015 02:27:49 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-xprofile/classes/class-bp-xprofile-field-type-checkbox.php
r9486 r9521 102 102 public function edit_field_options_html( array $args = array() ) { 103 103 $options = $this->field_obj->get_children(); 104 $option_values = BP_XProfile_ProfileData::get_value_byid( $this->field_obj->id, $args['user_id']);105 $option_values = ( array) maybe_unserialize( $option_values);104 $option_values = maybe_unserialize( BP_XProfile_ProfileData::get_value_byid( $this->field_obj->id, $args['user_id'] ) ); 105 $option_values = ( $option_values ) ? (array) $option_values : array(); 106 106 107 107 $html = ''; … … 133 133 // If the user has not yet supplied a value for this field, check to 134 134 // see whether there is a default value available 135 if ( ! is_array( $option_values ) &&empty( $option_values ) && empty( $selected ) && ! empty( $options[$k]->is_default_option ) ) {135 if ( empty( $option_values ) && empty( $selected ) && ! empty( $options[$k]->is_default_option ) ) { 136 136 $selected = ' checked="checked"'; 137 137 }
Note: See TracChangeset
for help on using the changeset viewer.