Commit 876ced2a authored by mihab's avatar mihab Committed by mihab
Browse files

Issue #3254370 by mihab: Prevent feeds from autotagging empty strings

parent 72ec2acd
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -36,6 +36,15 @@ function rules_autotag_feeds_set_target($source, $entity, $target, $terms, $mapp
    $terms = array($terms);
  }

  // Filter empty strings.
  $terms = array_filter($terms, function ($term) {
    return $term !== '';
  });

  if (empty($terms)) {
    return;
  }

  // Cut off "rules_autotag_" from the beginning.
  $target = substr($target, 14);