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 #1

Updated by Gerrit Code Review almost 9 years ago

  • Status changed from New to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/46232

Actions #2

Updated by Gerrit Code Review almost 9 years ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/46232

Actions #3

Updated by Gerrit Code Review almost 9 years ago

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/46232

Actions #4

Updated by Gerrit Code Review almost 9 years ago

Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/46232

Actions #5

Updated by Gerrit Code Review almost 9 years ago

Patch set 1 for branch TYPO3_7-6 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/46427

Actions #6

Updated by Gernot Leitgab almost 9 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #7

Updated by Gerrit Code Review almost 9 years ago

  • Status changed from Resolved to Under Review

Patch set 1 for branch TYPO3_6-2 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/46428

Actions #8

Updated by Gerrit Code Review almost 9 years ago

Patch set 2 for branch TYPO3_6-2 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/46428

Actions #9

Updated by Frank Nägler almost 9 years ago

  • Status changed from Under Review to Resolved
Actions #10

Updated by Benni Mack about 6 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF