From 9a7c4cc548095c27f78cdcc8787a30b11334136b Mon Sep 17 00:00:00 2001 From: dannylamb Date: Wed, 1 Apr 2020 12:54:49 -0300 Subject: [PATCH] whitespace to trigger travis --- src/Plugin/ContextReaction/JsonldTypeAlterReaction.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Plugin/ContextReaction/JsonldTypeAlterReaction.php b/src/Plugin/ContextReaction/JsonldTypeAlterReaction.php index b2e757ff..7ea5a42a 100644 --- a/src/Plugin/ContextReaction/JsonldTypeAlterReaction.php +++ b/src/Plugin/ContextReaction/JsonldTypeAlterReaction.php @@ -44,9 +44,11 @@ class JsonldTypeAlterReaction extends NormalizerAlterReaction { // Search for the entity in the graph. foreach ($normalized['@graph'] as &$elem) { + if (!is_array($elem['@type'])) { $elem['@type'] = [$elem['@type']]; } + if ($elem['@id'] === $this->getSubjectUrl($entity)) { foreach ($entity->get($config['source_field'])->getValue() as $type) { // If the configured field is using an entity reference,