Skip to content
Snippets Groups Projects
Commit 66e9603b authored by Benni Mack's avatar Benni Mack
Browse files

[BUGFIX] Avoid PHP 8 warnings in LocalCropScaleMaskHelper

Resolves: #96344
Releases: main, 11.5
Change-Id: I986945e16e0a2adef827fc0532a431be7ab25e03
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/72770


Reviewed-by: default avatarOliver Klee <typo3-coding@oliverklee.de>
Reviewed-by: default avatarStefan Bürk <stefan@buerk.tech>
Reviewed-by: default avatarOliver Bartsch <bo@cedev.de>
Reviewed-by: default avatarBenni Mack <benni@typo3.org>
Tested-by: default avatarcore-ci <typo3@b13.com>
Tested-by: default avatarStefan Bürk <stefan@buerk.tech>
Tested-by: default avatarOliver Bartsch <bo@cedev.de>
Tested-by: default avatarBenni Mack <benni@typo3.org>
parent 4853ef71
No related merge requests found
......@@ -82,13 +82,14 @@ class LocalCropScaleMaskHelper
// check if it is a json object
$cropData = json_decode($configuration['crop']);
if ($cropData) {
$crop = implode(',', [(int)$cropData->x, (int)$cropData->y, (int)$cropData->width, (int)$cropData->height]);
$offsetLeft = (int)($cropData->x ?? 0);
$offsetTop = (int)($cropData->y ?? 0);
$newWidth = (int)($cropData->width ?? 0);
$newHeight = (int)($cropData->height ?? 0);
} else {
$crop = $configuration['crop'];
[$offsetLeft, $offsetTop, $newWidth, $newHeight] = explode(',', $configuration['crop'], 4);
}
[$offsetLeft, $offsetTop, $newWidth, $newHeight] = explode(',', $crop, 4);
$backupPrefix = $gifBuilder->filenamePrefix;
$gifBuilder->filenamePrefix = 'crop_';
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment