diff --git a/mappers/taxonomy.inc b/mappers/taxonomy.inc index 72cd3f13073f201a7dd26a5e15356982e310618f..02ac54e704238b9df9216d047e7cb4c61c36ef62 100644 --- a/mappers/taxonomy.inc +++ b/mappers/taxonomy.inc @@ -78,7 +78,9 @@ function taxonomy_feeds_processor_targets_alter(&$targets, $entity_type, $bundle * @todo Do not create new terms for non-autotag fields. */ function taxonomy_feeds_set_target($source, $entity, $target, $terms, $mapping = array()) { - if (empty($terms)) { + + // Allow mapping the string '0' to a term name. + if (empty($terms) && $terms != 0) { return; } diff --git a/plugins/FeedsTermProcessor.inc b/plugins/FeedsTermProcessor.inc index efbac62054f39b9d6b2a885f18958598e81896b0..b336096bb03ed5aa180444289876b7d063aa8db2 100644 --- a/plugins/FeedsTermProcessor.inc +++ b/plugins/FeedsTermProcessor.inc @@ -42,7 +42,7 @@ class FeedsTermProcessor extends FeedsProcessor { * Validates a term. */ protected function entityValidate($term) { - if (empty($term->name)) { + if (drupal_strlen($term->name) == 0) { throw new FeedsValidationException(t('Term name missing.')); } }