Skip to content
Commit affe1cf8 authored by Oliver Bartsch's avatar Oliver Bartsch Committed by Christian Kuhn
Browse files

[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: default avatarcore-ci <typo3@b13.com>
Tested-by: default avatarJochen <rothjochen@gmail.com>
Tested-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: default avatarJochen <rothjochen@gmail.com>
Reviewed-by: default avatarBenjamin Franzke <bfr@qbus.de>
Reviewed-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
parent b3ff9172
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment