Task #102045
openThe LocalizationUtility should handle ValueError Exceptions thrown by sprintf
0%
Description
@see https://forge.typo3.org/issues/102044
@see https://www.php.net/manual/en/function.sprintf.php
Since PHP 8.0 sprintf throws ValueError Exceptions insteadof triggering a warning.
At the moment a ValueError is thrown and ultimately only catched by the RequestHandler, which results in a generic 500/503 Error page with a not so verbose error message (even in development).
It would be better, if the LocalizationUtility would catch ValueError Exceptions thrown by PHP, log them in a very verbose way (The translation string for the entity '{fullIdentifier}' is malformed: {originalValueError}). It should then also take alternativeLanguageKeys into account (as fallback) and finally return a blank string so fallback handling can kick in.
No data to display