Fluid icon indicating copy to clipboard operation
Fluid copied to clipboard

AliasViewHelpers: provide a propper fallback value for `map` if not set

Open stefanr opened this issue 2 years ago • 1 comments

The following change might break some templates during a TYPO3 patch update:

https://github.com/TYPO3/Fluid/blob/d521f00f60d783c0a7326c132475917350188c42/src/ViewHelpers/AliasViewHelper.php#L83C82-L83C82

If map is not set or null this results in errors. Probably ensure an array via cast or provide an empty array as fallback: $arguments['map'] ?? [].

stefanr avatar Dec 05 '23 18:12 stefanr

Hi @stefanr! Did you encounter this problem in a real project? If so, it would be interesting which error was shown in that case.

In the old version of the code, $arguments['map'] was also used without checks for null, also because the argument is specified as required and with type array.

s2b avatar Dec 08 '23 13:12 s2b

Without further information about the error, we are unable to reproduce this. Feel free to open a new issue if you can provide more information.

s2b avatar Jun 25 '24 13:06 s2b