From 4b7360bb67749041472bd9e04d0cfe27c5a9db96 Mon Sep 17 00:00:00 2001 From: Andreas Hirsch Date: Wed, 4 Sep 2024 17:01:09 +0200 Subject: [PATCH] Fix detection of IPTC preservation in stripColorProfileParameters --- Classes/Operation/HasIPTCPreservation.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Classes/Operation/HasIPTCPreservation.php b/Classes/Operation/HasIPTCPreservation.php index b2ed7ea..5087b30 100644 --- a/Classes/Operation/HasIPTCPreservation.php +++ b/Classes/Operation/HasIPTCPreservation.php @@ -33,7 +33,9 @@ class HasIPTCPreservation implements IOperation, SingletonInterface public function execute(array $parameter = []): OperationResult { if (isset($GLOBALS['TYPO3_CONF_VARS']['GFX']['processor_stripColorProfileParameters'])) { - return new OperationResult(true, (bool)array_search('!iptc', $GLOBALS['TYPO3_CONF_VARS']['GFX']['processor_stripColorProfileParameters'] ?? []) !== false); + foreach($GLOBALS['TYPO3_CONF_VARS']['GFX']['processor_stripColorProfileParameters'] as $index => $key) { + if (strpos($key, '!iptc') !== false) return new OperationResult(true, true); + } } return new OperationResult(true, strpos($GLOBALS['TYPO3_CONF_VARS']['GFX']['processor_stripColorProfileCommand'] ?? '','!iptc') !== false); }