#99796ClickEnlargeViewHelper: wrong data-type for argument `configuration`
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
History 36
-
Georg Ringer commented and changed status
NewAccepted 02/02/23, 08:20 -
Gerrit Code Review pushed patch set 1 for main to change 77678 status
AcceptedUnder Review 02/03/23, 07:03 -
Gerrit Code Review pushed patch set 1 for 11.5 to change 77850 02/14/23, 12:27
-
Gerrit Code Review pushed patch set 2 for 11.5 to change 77850 02/15/23, 12:58
-
Georg Ringer commented and changed status
Under ReviewResolved done0 %100 % 02/15/23, 13:00Applied in changeset commit:9b67512c93962cf3986b40fef00d03a4d92cb665.
-
Benni Mack changed status
ResolvedClosed 03/14/23, 11:47
you are absolutley correct, the documentation is wrong. as mixed however allows array as well, nothing will break.
do you wanna push a change?