#102044The ContentObjectRenderer needs to catch \Throwable insteadof \Exception
Description
The ContentObjectRenderer is not capable of dealing with \Throwable errors, that do not extend \Exception. A common Error that will “fall through” is a ValueError that is thrown by some php function. For example the sprintf function, which is used by the Translation utilities might throw a ValueError if the translation string contains an invalid formatter. This can happen when a translator leaves a literal “%” character in xliff strings.
This could be fixed by changing the catch argument here from \Exception to \Throwable.
https://github.com/TYPO3/typo3/blob/main/typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php#L670
In my case a typo3 V11 installation is affected. The bugfix is so small and will not break any system with a minimum requirement of php 7+. So i would argue for backports to V12 and V11 as well.
Reviews 3
History 27
-
Gerrit Code Review pushed patch set 1 for main to change 81573 status
NewUnder Review 10/25/23, 20:02 -
Gerrit Code Review pushed patch set 2 for main to change 81573 10/26/23, 06:43
-
Gerrit Code Review pushed patch set 3 for main to change 81573 10/26/23, 19:09
-
Gerrit Code Review pushed patch set 1 for 12.4 to change 84756 06/19/24, 21:06
-
Gerrit Code Review pushed patch set 1 for 11.5 to change 84757 06/19/24, 21:06
-
Sascha Egerer commented and changed status
Under ReviewResolved done0 %100 % 06/19/24, 21:10 -
Benni Mack changed status
ResolvedClosed 07/09/24, 15:19
Applied in changeset commit:9819ed85807fb3804be4d9c559a8b16b3970435d.