[BUGFIX] Serialize expression in switch viewhelper
[Packages/TYPO3.CMS.git] / typo3 / sysext / fluid / Classes / ViewHelpers / SwitchViewHelper.php
index 9a9b560..ec6f602 100644 (file)
@@ -74,7 +74,7 @@ class SwitchViewHelper extends \TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelp
                $this->backupSwitchState();
                $templateVariableContainer = $this->renderingContext->getViewHelperVariableContainer();
 
-               $templateVariableContainer->addOrUpdate(\TYPO3\CMS\Fluid\ViewHelpers\SwitchViewHelper::class, 'switchExpression', $expression);
+               $templateVariableContainer->addOrUpdate(\TYPO3\CMS\Fluid\ViewHelpers\SwitchViewHelper::class, 'switchExpression', serialize($expression));
                $templateVariableContainer->addOrUpdate(\TYPO3\CMS\Fluid\ViewHelpers\SwitchViewHelper::class, 'break', FALSE);
 
                foreach ($this->childNodes as $childNode) {