From 40d9540c336d55389202073512660c74c2d8979f Mon Sep 17 00:00:00 2001 From: "Prashant.c" Date: Sun, 10 Jun 2018 11:28:29 +0500 Subject: [PATCH] Issue #2958571 by elgordogrande, Prashant.c, Fabianx: DrupalBlock cache error when empty --- src/TwigExtension.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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'] : [], ]; }