[BUGFIX] Avoid access to $_SERVER['REQUEST_TIME']
The ProductionExceptionHandler now uses the Context API for generating the access time string, which among others, is used in the error code. Therefore, the class is also refactored to use DI. This required to remove the previously passed $configuration argument from the constructor. It will now be set via a new `setConfiguration()` method. Passing the $configuration as constructor argument is marked as deprecated, affecting installations, using custom exception handler classes. Additionally, another regression, introduced in #94315, is fixed. A custom error message, configured in TypoScript, using the `%s` placeholder, was no longer be substituted with the actual error, making any mapping between frontend output and log entry impossible. This is fixed by replacing the `%s` with the new `{code}` placeholder. Resolves: #95009 Related: #94315 Releases: master Change-Id: I63bc0bfc74cd2bc33a761241f8392c1bcda90c04 Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/70792 Tested-by:core-ci <typo3@b13.com> Tested-by:
Jochen <rothjochen@gmail.com> Tested-by:
Christian Kuhn <lolli@schwarzbu.ch> Reviewed-by:
Jochen <rothjochen@gmail.com> Reviewed-by:
Benjamin Franzke <bfr@qbus.de> Reviewed-by:
Christian Kuhn <lolli@schwarzbu.ch>
Showing
- typo3/sysext/core/Documentation/Changelog/master/Deprecation-95009-PassingTypoScriptConfigurationAsConstructorArgumentToExceptionHandler.rst 43 additions, 0 deletions...tConfigurationAsConstructorArgumentToExceptionHandler.rst
- typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php 10 additions, 1 deletion.../frontend/Classes/ContentObject/ContentObjectRenderer.php
- typo3/sysext/frontend/Classes/ContentObject/Exception/ExceptionHandlerInterface.php 7 additions, 0 deletions...ses/ContentObject/Exception/ExceptionHandlerInterface.php
- typo3/sysext/frontend/Classes/ContentObject/Exception/ProductionExceptionHandler.php 31 additions, 29 deletions...es/ContentObject/Exception/ProductionExceptionHandler.php
- typo3/sysext/frontend/Configuration/Services.yaml 4 additions, 0 deletionstypo3/sysext/frontend/Configuration/Services.yaml
- typo3/sysext/frontend/Tests/Unit/ContentObject/ContentObjectRendererTest.php 12 additions, 3 deletions...nd/Tests/Unit/ContentObject/ContentObjectRendererTest.php
- typo3/sysext/frontend/Tests/Unit/ContentObject/Exception/ProductionExceptionHandlerTest.php 26 additions, 16 deletions...ontentObject/Exception/ProductionExceptionHandlerTest.php
Please register or sign in to comment