Commit c634d404 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/+/72787


Tested-by: core-ci's avatarcore-ci <typo3@b13.com>
Tested-by: Benni Mack's avatarBenni Mack <benni@typo3.org>
Reviewed-by: Benni Mack's avatarBenni Mack <benni@typo3.org>
parent f99cd918
......@@ -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_';
......
Supports Markdown
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