Review main Merged

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

Christian Kuhn CR +2 V +2 Easy +15 −2 updated 06/13/21, 14:35

Commit message

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

Review

  • Code review CR +2

    Imported before Forger kept the single votes, the next import adds them.

  • Verified V +2

    Imported before Forger kept the single votes, the next import adds them.

Issues 3

Files 1