diff --git a/src/TwigExtension.php b/src/TwigExtension.php index 0e6edbb..da7d328 100644 --- a/src/TwigExtension.php +++ b/src/TwigExtension.php @@ -137,7 +137,7 @@ class TwigExtension extends \Twig_Extension { // Preserve cache metadata of empty blocks. $build = [ '#markup' => '', - '#cache' => $content['#cache'], + '#cache' => isset($content['#cache']) ? $content['#cache'] : [], ]; }