Revert "[BUGFIX] Serialize expression in switch viewhelper" 37/35437/2
authorAnja Leichsenring <aleichsenring@ab-softlab.de>
Sun, 14 Dec 2014 18:14:34 +0000 (19:14 +0100)
committerAnja Leichsenring <aleichsenring@ab-softlab.de>
Sun, 14 Dec 2014 18:14:48 +0000 (19:14 +0100)
This reverts commit 197a810b6a7db41717f30c0d8101c3e0181690fc.

The proposed solution of serialzing the expression was post merge rejected by the strategy team.
The issue will be set to new and a more elegant solution
is wanted for this. Sorry guys and thanks for all the effort

Change-Id: Ie9c97546934c995183552143bca29934a9611f93
Releases: master, 6.2
Reviewed-on: http://review.typo3.org/35437
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
typo3/sysext/fluid/Classes/ViewHelpers/CaseViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/SwitchViewHelper.php

index b586bb5..35ddb62 100644 (file)
@@ -36,7 +36,7 @@ class CaseViewHelper extends \TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper
                if (is_null($value) && $default === FALSE) {
                        throw new \TYPO3\CMS\Fluid\Core\ViewHelper\Exception('The case View helper must have either value or default argument', 1382867521);
                }
-               $switchExpression = unserialize($viewHelperVariableContainer->get(\TYPO3\CMS\Fluid\ViewHelpers\SwitchViewHelper::class, 'switchExpression'));
+               $switchExpression = $viewHelperVariableContainer->get(\TYPO3\CMS\Fluid\ViewHelpers\SwitchViewHelper::class, 'switchExpression');
 
                // non-type-safe comparison by intention
                if ($default === TRUE || $switchExpression == $value) {
index ec6f602..9a9b560 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', serialize($expression));
+               $templateVariableContainer->addOrUpdate(\TYPO3\CMS\Fluid\ViewHelpers\SwitchViewHelper::class, 'switchExpression', $expression);
                $templateVariableContainer->addOrUpdate(\TYPO3\CMS\Fluid\ViewHelpers\SwitchViewHelper::class, 'break', FALSE);
 
                foreach ($this->childNodes as $childNode) {