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; }