Skip to content

Commit 0ab0e46

Browse files
committed
Fix compatibility issue with Magento 2.4.4 in layout helper
1 parent e41eac2 commit 0ab0e46

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Helper/Layout.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,8 @@ protected function buildLayout(string $parentNode): array
8282
$block = $this->layout->getBlock($childName);
8383

8484
if (is_object($block)) {
85-
$templateFile = $block->getTemplateFile() ? $this->cleanFilename($block->getTemplateFile()) : '';
85+
$template = (string) $block->getTemplate();
86+
$templateFile = $template !== '' ? $this->cleanFilename($block->getTemplateFile($template)) : '';
8687
$reflectionClass = new ReflectionClass($block);
8788
$layout[$childName]['scope'] = $block->isScopePrivate();
8889
$layout[$childName]['classname'] = $this->cleanClassname(get_class($block));

0 commit comments

Comments
 (0)