[BUGFIX] Make TypoScriptParser sortList more strict 12/42112/5
authorBenjamin Mack <benni@typo3.org>
Wed, 29 Jul 2015 18:01:24 +0000 (20:01 +0200)
committerSusanne Moog <typo3@susannemoog.de>
Thu, 6 Aug 2015 11:07:06 +0000 (13:07 +0200)
commit375b7cb6111568c2cbad26ea2c8c302150903e5a
treeaf45b7ac36da3f636c1906cac33f255ea804fce4
parent8f4993746bd1470e2cfc1fe7d94405ce0de71204
[BUGFIX] Make TypoScriptParser sortList more strict

When calling the := sortList() with a "numeric" modifier
of the TypoScript parser with a string, the sort() method
differs between PHP versions. In order to make this behaviour
more strict, a check is done before the elements are sorted
to only have numeric values in the list, otherwise an Exception
is now thrown.

As this changes behaviour, the test should be excluded for
PHP7 in 6.2, the behaviour cannot be modified in 6.2 without
possibly breaking the output of a Frontend site.

Resolves: #65317
Releases: master
Change-Id: Ife4f0de367398e6e5e35b6df9f1c0ea980597773
Reviewed-on: http://review.typo3.org/42112
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Susanne Moog <typo3@susannemoog.de>
Tested-by: Susanne Moog <typo3@susannemoog.de>
typo3/sysext/core/Classes/TypoScript/Parser/TypoScriptParser.php
typo3/sysext/core/Documentation/Changelog/master/Breaking-65317-TypoScriptParserSortListSanitizesInputOnNumericalSort.rst [new file with mode: 0644]
typo3/sysext/core/Tests/Unit/TypoScript/Parser/TypoScriptParserTest.php