#101185unaffected crop attribute in ImageViewhelper
Description
the class TYPO3\CMS\Fluid\ViewHelpers\ImageViewHelper has an attribute ‘crop’ which is defined as string|bool
but if you inspect the variable $this->arguments[‘crop’] it is parsed to an array
that affects following line:
$cropVariantCollection = CropVariantCollection::create((string)$cropString);
the argument is parsed to a string and therefore the string ‘Array’ is given and an empty CropArea is created
could be solved via check:
$cropString = is_array($this->arguments[‘crop’]) ? json_encode($this->arguments[‘crop’]) : $this->arguments[‘crop’];
tested in TYPO3 11 with PHP 7.4
Reviews 3
History 37
-
Oliver Hader changed category 06/28/23, 07:51
-
Gerrit Code Review pushed patch set 1 for main to change 81157 status
NewUnder Review 09/21/23, 13:59 -
Gerrit Code Review pushed patch set 2 for main to change 81157 09/21/23, 16:15
-
Gerrit Code Review pushed patch set 1 for 12.4 to change 81151 09/22/23, 15:23
-
Gerrit Code Review pushed patch set 1 for 11.5 to change 81192 09/22/23, 15:23
-
Benni Mack commented and changed status
Under ReviewResolved done0 %100 % 09/22/23, 15:50 -
Benni Mack changed status
ResolvedClosed 07/09/24, 14:15
Applied in changeset commit:385c60a30b8b188f93240f01b1edae2b5371ca59.