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 Done
    • Benni Mack +2
    • Jochen Roth +1
    • Anja Leichsenring +1
    • Christian Kuhn +1
  • Verified V +2 Done
    • Benni Mack +2
    • Jochen Roth +1
    • Anja Leichsenring +1
    • Christian Kuhn +1
    • core-ci +1 CI

Issues 3

Files 1

Review log 1422

  1. Christian Kuhn uploaded patch set 1 06/12/21, 20:08

  2. core-ci voted on patch set 1 V +1 06/12/21, 20:17 Core CI is happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/12343

  3. Christian Kuhn uploaded patch set 2 06/12/21, 20:30

  4. Christian Kuhn updated the commit message in patch set 3 06/12/21, 20:32

  5. core-ci voted on patch set 2 V +1 06/12/21, 20:39 Core CI is happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/12344

  6. core-ci voted on patch set 3 V +1 06/12/21, 20:44 Core CI is happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/12345

  7. Christian Kuhn uploaded patch set 4 06/12/21, 21:14

  8. Markus Klein voted on patch set 4 CR +1 06/12/21, 21:16

  9. core-ci voted on patch set 4 V +1 06/12/21, 21:22 Core CI is happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/12348

  10. Christian Kuhn uploaded patch set 5 06/12/21, 22:17

  11. core-ci commented on patch set 5 06/12/21, 22:26 Core CI is happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/12350

  12. Christian Kuhn rebased onto patch set 6 06/12/21, 23:09

  13. core-ci voted on patch set 6 V +1 06/12/21, 23:22 Core CI is happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/12354

  14. Christian Kuhn uploaded patch set 7 06/13/21, 00:41

  15. core-ci commented on patch set 7 06/13/21, 00:53 Core CI is happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/12359

  16. Christian Kuhn rebased onto patch set 8 06/13/21, 02:11

  17. core-ci voted on patch set 8 V +1 06/13/21, 02:22 Core CI is happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/12369

  18. Anja Leichsenring voted on patch set 8 V +1 CR +1 06/13/21, 13:53

  19. Jochen Roth voted on patch set 8 V +1 CR +1 06/13/21, 13:58

  20. Christian Kuhn voted on patch set 8 V +1 CR +1 06/13/21, 14:22

  21. Benni Mack voted on patch set 8 V +2 CR +2 06/13/21, 14:35

  22. Benni Mack merged patch set 9 06/13/21, 14:35