From 0b537877052f9394a833a34c2796c687493af4a5 Mon Sep 17 00:00:00 2001 From: Lorenzo Stramaccia Date: Thu, 26 May 2022 11:30:00 +0200 Subject: [PATCH] Fix issue #61 --- Plugin/View/Element/AbstractBlockPlugin.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Plugin/View/Element/AbstractBlockPlugin.php b/Plugin/View/Element/AbstractBlockPlugin.php index 47afeed..5e19414 100644 --- a/Plugin/View/Element/AbstractBlockPlugin.php +++ b/Plugin/View/Element/AbstractBlockPlugin.php @@ -58,6 +58,10 @@ public function aroundToHtml(AbstractBlock $subject, \Closure $proceed) return $proceed(); } + if ($subject->getTemplate() === null) { + return $proceed(); + } + $name = $subject->getNameInLayout(); $this->elementRegistry->start($name);