From 77094253584bde34058fecfa0d838be7b7c9fadb Mon Sep 17 00:00:00 2001 From: Alexander O'Neill Date: Wed, 2 Feb 2022 17:03:22 +0000 Subject: [PATCH] Add check for cache tags in JSON-LD alter hook. --- islandora.module | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/islandora.module b/islandora.module index 738be5b4..85abaf0d 100644 --- a/islandora.module +++ b/islandora.module @@ -251,7 +251,7 @@ function islandora_jsonld_alter_normalized_array(EntityInterface $entity, array $reaction->execute($entity, $normalized, $context); foreach ($context_manager->getActiveContexts() as $context_config) { try { - if ($context_config->getReaction($reaction->getPluginId())) { + if ($context_config->getReaction($reaction->getPluginId()) && isset($context['cacheability'])) { $context['cacheability']->addCacheTags($context_config->getCacheTags()); }; }