Project

General

Profile

Actions

Bug #72936

closed

It's not possible to use '0' as userFunc argument in TypoScript

Added by Gernot Leitgab almost 9 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
-
Target version:
-
Start date:
2016-01-25
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
6.2
PHP Version:
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

If '0' is used as an argument, the user function is triggered with an empty array.

Example:

[userFunc = \Vendor\UserFunc\ClassName::methodName(0)] 
  [...]
[global]

To fix this issue the line

$funcValues = $matches[2][0] ? $this->parseUserFuncArguments($matches[2][0]) : array();

has to be changed to
$funcValues = $matches[2][0] !== '' ? $this->parseUserFuncArguments($matches[2][0]) : array();

in file EXT:core/Classes/Configuration/TypoScript/ConditionMatching/AbstractConditionMatcher.php

Actions

Also available in: Atom PDF