From ec79d54496102af4119f60431bcbfe91292169d0 Mon Sep 17 00:00:00 2001 From: Marc Bastian Heinrichs Date: Fri, 8 Aug 2025 11:55:45 +0200 Subject: [PATCH] [FEATURE] Provide the current value in overwrite value from TypoScript feature Resolves: #1260 --- Classes/Utility/TypoScriptUtility.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Classes/Utility/TypoScriptUtility.php b/Classes/Utility/TypoScriptUtility.php index 7d2662639..33e9f25af 100644 --- a/Classes/Utility/TypoScriptUtility.php +++ b/Classes/Utility/TypoScriptUtility.php @@ -25,8 +25,10 @@ public static function overwriteValueFromTypoScript( ?array $conf = [], string $key = '' ): string { - if (ObjectUtility::getContentObject()->cObjGetSingle($conf[$key]??'', $conf[$key . '.']??[])) { - $string = ObjectUtility::getContentObject()->cObjGetSingle($conf[$key], $conf[$key . '.']); + $contentObject = ObjectUtility::getContentObject(); + $contentObject->setCurrentVal($string); + if ($contentObject->cObjGetSingle($conf[$key]??'', $conf[$key . '.']??[])) { + $string = $contentObject->cObjGetSingle($conf[$key], $conf[$key . '.']); } return $string; }