Skip to content
Snippets Groups Projects
Commit fbedb3fb authored by Chris Leppanen's avatar Chris Leppanen
Browse files

Allow 0 as a term name.

parent f288fbcc
No related branches found
No related tags found
No related merge requests found
......@@ -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;
}
......
......@@ -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.'));
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment