Actions
Bug #101185
closedunaffected crop attribute in ImageViewhelper
Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Image Cropping
Target version:
-
Start date:
2023-06-28
Due date:
% Done:
100%
Estimated time:
TYPO3 Version:
11
PHP Version:
7.4
Tags:
Complexity:
Is Regression:
Sprint Focus:
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
Actions