Issue Bug Closed

#61144Trailing comma in arrays causes exception

Mathias Brodala 08/22/14, 14:36 updated 10/02/18, 11:52

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.

Reviews 1