From 05022713829bc330aaad3f42dab5e8dfc9c15c76 Mon Sep 17 00:00:00 2001 From: Martin Schittig Date: Fri, 28 Jun 2024 09:21:20 +0200 Subject: [PATCH] fix bug for content element article --- src/Resources/contao/classes/HelperClass.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Resources/contao/classes/HelperClass.php b/src/Resources/contao/classes/HelperClass.php index d4a1c2a..d9c6734 100755 --- a/src/Resources/contao/classes/HelperClass.php +++ b/src/Resources/contao/classes/HelperClass.php @@ -41,7 +41,7 @@ public function addClassesToArticle($objRow) //public function addClassesToElement($objRow, $strBuffer, $objElement) public function addClassesToElement(ContentModel $contentModel, string $buffer, $element) { - $cssId = unserialize($contentModel->cssID)[1]; + $cssId = (is_array(unserialize($contentModel->cssID))) ? unserialize($contentModel->cssID)[1] : ''; $classes = 'content-' . $contentModel->type . ((empty($cssId)) ? '' : ' ' . $cssId); if (!is_array($arrCustom = unserialize($contentModel->customClass))) return $buffer;