Skip to content
Snippets Groups Projects
Commit ee13a6fc authored by Adrian Lorenc's avatar Adrian Lorenc Committed by Claudiu Cristea
Browse files

ISAICP-9484: Remove empty term names.

parent 4dcab3a4
No related branches found
No related tags found
1 merge request!210Patch release 2.2.1
......@@ -4,6 +4,7 @@
namespace Drupal\eu_oss_catalogue\Plugin\eu_oss_catalogue\Resolver;
use Drupal\Component\Utility\NestedArray;
use Drupal\Core\Database\Connection;
use Drupal\Core\Entity\EntityTypeManagerInterface;
use Drupal\Core\Entity\Sql\SqlContentEntityStorage;
......@@ -74,6 +75,9 @@ public function resolve(?array &$value, Project $project, array $metadata, Field
return;
}
// Remove empty term names.
$value = NestedArray::filter($value);
// Get a flat list of all term names regardless of the language.
$allTermNames = array_values(array_merge(...array_values($value)));
......
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