Skip to content
Snippets Groups Projects
Commit 18a4ba9f authored by Helmut Hummel's avatar Helmut Hummel
Browse files

[TASK] Simplify ErrorHandler code

To decide whether an error should be handled by the ErrorHandler
or not, only three things must be taken into account.

1. The current error_reporting() level
2. Error levels that are ignored by configuration
3. Error level of the error that is just handled

When combining the first two (with logical and),
results in the error level for the errors
that should be handled at all.

When combining this with the error level of the
currently handled error (again with logical and),
we can determine wether the error should be handled or not.

This always works with any PHP version and with suppressed
errors and without.

Therefore the PHP version check becomes obsolete and is removed.

Releases: main, 11.5
Resolves: #96311
Change-Id: I96d440d9db05a3acf1f8a12664787e05a3e31254
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/72603


Tested-by: default avatarcore-ci <typo3@b13.com>
Tested-by: default avatarBenni Mack <benni@typo3.org>
Tested-by: default avatarStefan Bürk <stefan@buerk.tech>
Tested-by: default avatarHelmut Hummel <typo3@helhum.io>
Reviewed-by: default avatarBenni Mack <benni@typo3.org>
Reviewed-by: default avatarStefan Bürk <stefan@buerk.tech>
Reviewed-by: default avatarHelmut Hummel <typo3@helhum.io>
parent ff7a2f22
Branches
Tags
No related merge requests found
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