[TASK] Obsolete unserialize(serialize()) 27/48327/3
authorChristian Kuhn <lolli@schwarzbu.ch>
Fri, 27 May 2016 11:36:13 +0000 (13:36 +0200)
committerWouter Wolters <typo3@wouterwolters.nl>
Fri, 27 May 2016 12:34:09 +0000 (14:34 +0200)
There is a funny comment for this call within TypoScriptParser.
Reading the code, there seems to be no part that works with
references on this variable in setVal().

The patch now removes this odd construct. In the
unlikely case some issue still pops up later, we would
at least have a clear way to reproduce then ...

Change-Id: I70f5f8915386a7a4b5038d66611b4ec359f5c1fa
Resolves: #76323
Releases: master
Reviewed-on: https://review.typo3.org/48327
Reviewed-by: Markus Klein <markus.klein@typo3.org>
Tested-by: Markus Klein <markus.klein@typo3.org>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
typo3/sysext/core/Classes/TypoScript/Parser/TypoScriptParser.php

index 06db119..2b4be20 100644 (file)
@@ -454,8 +454,7 @@ class TypoScriptParser
                                             } else {
                                                 $res = $this->getVal($theVal, $this->setup);
                                             }
-                                            $this->setVal($objStrName, $setup, unserialize(serialize($res)), 1);
-                                            // unserialize(serialize(...)) may look stupid but is needed because of some reference issues. See Kaspers reply to "[TYPO3-core] good question" from December 15 2005.
+                                            $this->setVal($objStrName, $setup, $res, 1);
                                             break;
                                         case '>':
                                             if ($this->syntaxHighLight) {