From 3ce6b692cc4122eb22d8d7723842f20878a04f98 Mon Sep 17 00:00:00 2001
From: Sascha Egerer <sascha@sascha-egerer.de>
Date: Tue, 14 Jul 2015 17:54:41 +0200
Subject: [PATCH] [BUGFIX] Fix parseUserFuncArguments to respect 0 as argument

"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/41218
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Benjamin Mack <benni@typo3.org>
Tested-by: Benjamin Mack <benni@typo3.org>
---
 .../TypoScript/ConditionMatching/AbstractConditionMatcher.php   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/typo3/sysext/core/Classes/Configuration/TypoScript/ConditionMatching/AbstractConditionMatcher.php b/typo3/sysext/core/Classes/Configuration/TypoScript/ConditionMatching/AbstractConditionMatcher.php
index d5078b4b9dcc..206f705f5873 100644
--- a/typo3/sysext/core/Classes/Configuration/TypoScript/ConditionMatching/AbstractConditionMatcher.php
+++ b/typo3/sysext/core/Classes/Configuration/TypoScript/ConditionMatching/AbstractConditionMatcher.php
@@ -469,7 +469,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);
-- 
GitLab