diff -u b/addressfield_autocomplete.module b/addressfield_autocomplete.module --- b/addressfield_autocomplete.module +++ b/addressfield_autocomplete.module @@ -631,9 +631,8 @@ if (!property_exists($entity, 'type') && isset($entity->field_name)) { $bundle_name = $entity->field_name; } - else - { - $bundle_name = $entity_type == 'taxonomy_term' ? $entity->vocabulary_machine_name : $entity->type; + else { + $bundle_name = $entity_type == 'taxonomy_term' ? $entity->vocabulary_machine_name : $entity_type; } $field_name = $instance['widget']['settings']['addressfield_autocomplete_field']; $field_instance = field_info_instance($entity_type, $field_name, $bundle_name);