[BUGFIX] Fix parseUserFuncArguments to respect 0 as argument 25/41225/2
authorSascha Egerer <sascha@sascha-egerer.de>
Tue, 14 Jul 2015 15:54:41 +0000 (17:54 +0200)
committerBenjamin Mack <benni@typo3.org>
Tue, 14 Jul 2015 17:19:21 +0000 (19:19 +0200)
"0" must be an valid "last argument" value in the parseUserFuncArguments
method.

The implementation of the argument iteration must strictly check if
the arguments string is empty.

Change-Id: I8cee20a48030ea9163f55723d9027f39c43e5e1c
Resolves: #68132
Related: #61256
Releases: master, 6.2
Reviewed-on: http://review.typo3.org/41225
Reviewed-by: Benjamin Mack <benni@typo3.org>
Tested-by: Benjamin Mack <benni@typo3.org>
typo3/sysext/core/Classes/Configuration/TypoScript/ConditionMatching/AbstractConditionMatcher.php

index 83d249e..61da41a 100644 (file)
@@ -425,7 +425,7 @@ abstract class AbstractConditionMatcher {
        protected function parseUserFuncArguments($arguments) {
                $result = array();
                $arguments = trim($arguments);
-               while ($arguments) {
+               while ($arguments !== '') {
                        if ($arguments[0] === ',') {
                                $result[] = '';
                                $arguments = substr($arguments, 1);