[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:core-ci <typo3@b13.com> Tested-by:
Anja Leichsenring <aleichsenring@ab-softlab.de> Tested-by:
Jochen <rothjochen@gmail.com> Tested-by:
Christian Kuhn <lolli@schwarzbu.ch> Tested-by:
Benni Mack <benni@typo3.org> Reviewed-by:
Anja Leichsenring <aleichsenring@ab-softlab.de> Reviewed-by:
Jochen <rothjochen@gmail.com> Reviewed-by:
Christian Kuhn <lolli@schwarzbu.ch> Reviewed-by:
Benni Mack <benni@typo3.org>
Please register or sign in to comment