Project

General

Profile

Actions

Bug #61144

closed

Trailing comma in arrays causes exception

Added by Mathias Brodala over 10 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Fluid
Target version:
-
Start date:
2014-08-22
Due date:
% Done:

100%

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

Description

Given the following viewhelper invocation:

<f:render partial="Foo" arguments="{
  foo: 1,
  bar: 2,
}"/>

Fluid throws an exception like this due to the trailing comma:

#1237900529: The argument "arguments" was registered with type "array", but is of type "string" in view helper "TYPO3\CMS\Fluid\ViewHelpers\RenderViewHelper"

While the array above may not be valid in JSON, it is fully valid in JavaScript. Given the fact that the only other piece of software that chokes on this is the Internet Explorer (at least ancient versions) I'd opt for allowing this.


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Feature #69863: Use new standalone Fluid as composer dependencyClosedClaus Due2015-09-16

Actions
Actions

Also available in: Atom PDF