Skip to content
Snippets Groups Projects
Commit c73bf709 authored by Martin Giessing's avatar Martin Giessing
Browse files

Issue #3458752 by erik_petra: Empty region transform results in error

parent 3000b07b
Branches
Tags 1.1.0-beta5
No related merge requests found
......@@ -231,6 +231,15 @@ class TransformBlock extends ConfigEntityBase implements TransformBlockInterface
}
}
/**
* {@inheritdoc}
*/
public function getCacheTagsToInvalidate() {
$tags = parent::getCacheTagsToInvalidate();
$tags[] = 'config:transform_api.regions';
return $tags;
}
/**
* {@inheritdoc}
*/
......
......@@ -90,7 +90,7 @@ class RequestPath extends TransformationTypeBase {
foreach ($this->transformBlocks->getVisibleBlocksPerRegion($cacheable_metadata_list)[$region] as $block) {
$transformation[$block->id()] = BlockTransform::createFromBlock($block);
}
$cacheMetadata = $cacheMetadata->merge($cacheable_metadata_list[$region]);
$cacheMetadata = $cacheMetadata->merge($cacheable_metadata_list[$region] ?? new CacheableMetadata());
}
$cacheMetadata->applyTo($transformation);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment