Skip to content

Commit a55894d

Browse files
authored
fix Contao 4.8 compatibility
1 parent 2e1d42a commit a55894d

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/EventListener/InheritArticleListener.php

+7-3
Original file line numberDiff line numberDiff line change
@@ -248,8 +248,12 @@ protected function applyThemeAndLayout(PageModel $page, LayoutModel $layout): vo
248248
$page->layoutId = $layout->id;
249249
$page->template = $layout->template ?: 'fe_page';
250250
$page->templateGroup = $theme->templates;
251-
[$strFormat, $strVariant] = explode('_', $layout->doctype);
252-
$page->outputFormat = $strFormat;
253-
$page->outputVariant = $strVariant;
251+
$page->minifyMarkup = $theme->minifyMarkup;
252+
253+
if (null !== $layout->doctype) {
254+
[$format, $variant] = explode('_', $layout->doctype);
255+
$page->outputFormat = $format;
256+
$page->outputVariant = $variant;
257+
}
254258
}
255259
}

0 commit comments

Comments
 (0)