Review main Merged

78622[BUGFIX] Prevent exception using getTSFE() in backend context

Oli Bartsch CR +2 V +2 Normal +64 −2 updated 04/14/23, 07:56

Commit message

In case the "getTSFE()" expression function is called
in backend context - having no TSFE available-, the
function returned "FALSE" since  #100237. This however
prevents to properly check such state in the expression
itself. This is now fixed by returning "NULL" instead,
as it's the case for similar functions, e.g. "site()" or
"siteLanguage()").

This allows to properly use the null-safe operator ("?").

Example usage: `[getTSFE()?.id = 123]`

Review

  • Code review CR +2 Done
    • Oli Bartsch +2
    • Oliver Klee +1
    • Jochen Roth +1
    • Christian Kuhn +1
    • Benni Mack +1
  • Verified V +2 Done
    • Oli Bartsch +2
    • Oliver Klee +1
    • Jochen Roth +1
    • Christian Kuhn +1
    • Benni Mack +1
    • core-ci +1 CI

Issues 2

Files 3

Review log 1521

  1. Oli Bartsch uploaded patch set 1 04/13/23, 15:23

  2. core-ci voted on patch set 1 V +1 04/13/23, 15:31 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/40575

  3. Oli Bartsch uploaded patch set 2 V +1 04/13/23, 15:35

  4. core-ci voted on patch set 2 V +1 04/13/23, 16:07 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/40577

  5. Oliver Klee voted on patch set 2 V +1 CR +1 04/13/23, 17:26

  6. Christian Kuhn uploaded patch set 3 CR +1 V +1 04/14/23, 05:32

  7. Christian Kuhn voted on patch set 3 V +1 CR +1 04/14/23, 05:32

  8. core-ci voted on patch set 3 V -1 04/14/23, 06:39 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/40586

  9. Benni Mack commented on patch set 3 04/14/23, 07:03

    Deprecation-100405-PropertyTypoScriptFrontendController-type.rst:49

    I would say lets keep the old format, as this is how it was done in v11 "[getTSFE() && getTSFE().type == 13]"
  10. Oli Bartsch commented on patch set 4 CR +1 V +1 04/14/23, 07:20

    Published edit on patch set 3.
  11. Oli Bartsch commented on patch set 4 04/14/23, 07:20

    Deprecation-100405-PropertyTypoScriptFrontendController-type.rst:49 Reply

    Done
  12. core-ci voted on patch set 3 V -1 04/14/23, 07:20 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/40586

  13. Christian Kuhn rebased onto patch set 5 04/14/23, 07:29

  14. core-ci voted on patch set 4 V -1 04/14/23, 07:35 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/40590

  15. Benni Mack voted on patch set 5 V +1 CR +1 04/14/23, 07:42

  16. core-ci voted on patch set 5 V +1 04/14/23, 07:46 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/40593

  17. Oliver Klee voted on patch set 5 V +1 CR +1 04/14/23, 07:48

  18. Jochen Roth voted on patch set 5 V +1 CR +1 04/14/23, 07:51

  19. Christian Kuhn voted on patch set 5 V +1 CR +1 04/14/23, 07:54

  20. Oli Bartsch voted on patch set 5 V +2 CR +2 04/14/23, 07:56

  21. Oli Bartsch merged patch set 6 04/14/23, 07:56