Index: Source/web/typo3/sysext/extbase/Classes/Utility/LocalizationUtility.php IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/Source/web/typo3/sysext/extbase/Classes/Utility/LocalizationUtility.php b/Source/web/typo3/sysext/extbase/Classes/Utility/LocalizationUtility.php --- a/Source/web/typo3/sysext/extbase/Classes/Utility/LocalizationUtility.php (date 1611313296931) +++ b/Source/web/typo3/sysext/extbase/Classes/Utility/LocalizationUtility.php (date 1611313296931) @@ -125,7 +125,16 @@ // This unrolls arguments from $arguments - instead of calling vsprintf which receives arguments as an array. // The reason is that only sprintf() will return an error message if the number of arguments does not match // the number of placeholders in the format string. Whereas, vsprintf would silently return nothing. - return sprintf($value, ...array_values($arguments)) ?: sprintf('Error: could not translate key "%s" with value "%s" and %d argument(s)!', $key, $value, count($arguments)); + try { + // PHP 8.0.0 sprintf no longer returns false on failure. + return sprintf($value, ...array_values($arguments))?:sprintf('Error: could not translate key "%s" with value "%s" and %d argument(s)!', $key, $value, count($arguments)); + } catch ( \Exception $e ) { + throw new \InvalidArgumentException( + sprintf('Error: could not translate key "%s" with value "%s" and %d argument(s)!', $key, $value, count($arguments)). + "\nmessage: ".$e->getMessage(), + 1611312869 + ); + } } return $value; }