From 962eeb24ed98248ba64cfff8fb2f5b06d295da2d Mon Sep 17 00:00:00 2001 From: Oliver Klee <typo3-coding@oliverklee.de> Date: Tue, 4 Apr 2023 11:39:05 +0200 Subject: [PATCH] [BUGFIX] Fix invalid array access in ImageManipulation/Ratio This also allows automated testing with a minimal data. Resolves: #100430 Related: #100249 Releases: main, 11.5 Change-Id: I2cee7ff96dee58ef76ce8f91161ed21e1a52553a Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/78451 Tested-by: core-ci <typo3@b13.com> Tested-by: Christian Kuhn <lolli@schwarzbu.ch> Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch> --- typo3/sysext/core/Classes/Imaging/ImageManipulation/Ratio.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/typo3/sysext/core/Classes/Imaging/ImageManipulation/Ratio.php b/typo3/sysext/core/Classes/Imaging/ImageManipulation/Ratio.php index d88fd8caa4b9..8b44f41cecb0 100644 --- a/typo3/sysext/core/Classes/Imaging/ImageManipulation/Ratio.php +++ b/typo3/sysext/core/Classes/Imaging/ImageManipulation/Ratio.php @@ -59,8 +59,8 @@ class Ratio foreach ($config as $id => $ratioConfig) { $areas[] = new self( $id, - $ratioConfig['title'], - (float)$ratioConfig['value'] + (string)($ratioConfig['title'] ?? ''), + (float)($ratioConfig['value'] ?? 0.0) ); } } catch (\Throwable $throwable) { -- GitLab