Index: sites/all/modules/contrib/content_taxonomy/content_taxonomy_autocomplete.module =================================================================== --- sites/all/modules/contrib/content_taxonomy/content_taxonomy_autocomplete.module (revision 2564) +++ sites/all/modules/contrib/content_taxonomy/content_taxonomy_autocomplete.module (revision ) @@ -153,9 +153,11 @@ $terms = array(); if (count($element['#default_value'])) { foreach ($element['#default_value'] as $delta => $entry) { + if ($entry[$field_key]) { - $terms[] = taxonomy_get_term($entry[$field_key]); - } - } + $terms[] = taxonomy_get_term($entry[$field_key]); + } + } + } $value = content_taxonomy_autocomplete_merge_tags($terms, $element['#vid']); $value = !empty($value) ? $value : NULL; return array($field_key => $value); @@ -244,9 +246,9 @@ * to the format to be stored in the field */ function content_taxonomy_autocomplete_form2data($extracted_ids, $field, $element) { - $existing_tids = is_array($extracted_ids['existing_tids']) ? $extracted_ids['existing_tids'] : array(); + $existing_tids = isset($extracted_ids['existing_tids']) && is_array($extracted_ids['existing_tids']) ? $extracted_ids['existing_tids'] : array(); $new_tids = array(); - if (is_array($extracted_ids['non_existing_terms'])) { + if (isset($extracted_ids['non_existing_terms']) && is_array($extracted_ids['non_existing_terms'])) { if ($field['widget']['extra_parent']) { $new_tids = content_taxonomy_autocomplete_insert_tags($extracted_ids['non_existing_terms'], $field['widget']['extra_parent']); }