Issue Bug Closed

#99796ClickEnlargeViewHelper: wrong data-type for argument `configuration`

Julian Hofmann 02/02/23, 07:38 updated 03/14/23, 11:47

Description

ClickEnlargeViewHelper initializes its argument `configuration` as ‘mixed’, containing “String, \TYPO3\CMS\Core\Resource\File or \TYPO3\CMS\Core\Resource\FileReference with link configuration”.

In fact, this argument is used only once: when passing it to `TypoScriptService::convertPlainArrayToTypoScriptArray()`. This method expects its argument to be an array (`@param array $typoScriptArray The TypoScript array (e.g. array(‘foo’ => ‘TEXT’, ‘foo.’ => array(‘bar’ => ‘baz’)))`) and has ‘array’ as its type declaration.

Seems, there are two issues:
  • The documentation of the argument does not meet its real use
  • The data-type does not meet the usage and will throw an exception

Reviews 2