Bug #102044
closedThe ContentObjectRenderer needs to catch \Throwable insteadof \Exception
100%
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.
Updated by Gerrit Code Review about 1 year ago
- Status changed from New to Under Review
Patch set 1 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/81573
Updated by Gerrit Code Review about 1 year ago
Patch set 2 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/81573
Updated by Gerrit Code Review about 1 year ago
Patch set 3 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/81573
Updated by Gerrit Code Review 5 months ago
Patch set 1 for branch 12.4 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/84756
Updated by Gerrit Code Review 5 months ago
Patch set 1 for branch 11.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/84757
Updated by Sascha Egerer 5 months ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 9819ed85807fb3804be4d9c559a8b16b3970435d.