diff --git a/typo3/sysext/core/Classes/Resource/Processing/LocalCropScaleMaskHelper.php b/typo3/sysext/core/Classes/Resource/Processing/LocalCropScaleMaskHelper.php index 583248378b7ecffe3b63175bc9c5fcd3c03eabab..432042bdd9e2143ec058a8efe2634d4452f4a736 100644 --- a/typo3/sysext/core/Classes/Resource/Processing/LocalCropScaleMaskHelper.php +++ b/typo3/sysext/core/Classes/Resource/Processing/LocalCropScaleMaskHelper.php @@ -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_';