Skip to content
Snippets Groups Projects
Commit f8c1f6da authored by Christian Kuhn's avatar Christian Kuhn Committed by Benni Mack
Browse files

[BUGFIX] Adapt to error_reporting level with PHP 8 STFU operator

The @ error control operator suppresses all errors raised by
the expression, right? Well ...

If an error handler has been registered, and an error is
raised by an @-prepended expression, the error handler
is still called with this error.

The TYPO3 core error handler thus detects if the error comes
from an @-prepended expression to not log / throw. In PHP < 8.0,
this can be achieved by checking error_reporting() === 0. With
PHP >= 8.0, the @ error control operator has been changed
to not suppress fatal PHP errors anymore, which in turn
changed the error_reporting() level to 4437 for an error
raised "inside" an @-prepended expression.

Adapt core to deal with the PHP 8 variant, too.

See also:
https://www.php.net/manual/en/language.operators.errorcontrol.php#125938

Resolves: #94329
Related: #94057
Related: #94269
Releases: master
Change-Id: Ie926685349beae3bdc9edbb288bc674d3115a64c
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/69475


Tested-by: default avatarcore-ci <typo3@b13.com>
Tested-by: default avatarAnja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: default avatarJochen <rothjochen@gmail.com>
Tested-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
Tested-by: default avatarBenni Mack <benni@typo3.org>
Reviewed-by: default avatarAnja Leichsenring <aleichsenring@ab-softlab.de>
Reviewed-by: default avatarJochen <rothjochen@gmail.com>
Reviewed-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: default avatarBenni Mack <benni@typo3.org>
parent 0f07ad53
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