Review main Merged

70867[BUGFIX] Add fallback values for frontend

Jochen Roth CR +2 V +2 Normal +94 −94 updated 09/17/21, 00:11

Commit message

For PHP8 in the frontend there are still
undefined key warnings.

This is fixed by adding fallbacks.

Review

  • Code review CR +2 Done
    • Oli Bartsch +2
    • Christian Kuhn +1
  • Verified V +2 Done
    • Oli Bartsch +2
    • Christian Kuhn +1
    • core-ci +1 CI

Issues 1

Files 5

Review log 3144

Show 1319 earlier messages
  1. Jochen Roth uploaded patch set 1 09/02/21, 14:12

  2. core-ci voted on patch set 1 V -1 09/02/21, 14:35 Core CI is not happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/16086

  3. Jochen Roth uploaded patch set 2 09/02/21, 14:58

  4. core-ci voted on patch set 2 V +1 09/02/21, 15:29 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/16100

  5. Christian Kuhn updated the commit message in patch set 3 09/06/21, 14:11

  6. Christian Kuhn voted on patch set 3 V +1 CR +1 09/06/21, 14:11

  7. core-ci voted on patch set 3 V -1 09/06/21, 14:27 Core CI is not happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/16328

  8. Benni Mack rebased onto patch set 4 09/07/21, 18:54

  9. core-ci voted on patch set 4 V +1 09/07/21, 19:07 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/16385

  10. Robert Kärner uploaded patch set 5 09/13/21, 07:04

  11. core-ci voted on patch set 5 V +1 09/13/21, 07:17 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/16634

  12. Robert Kärner uploaded patch set 6 09/13/21, 07:29

  13. core-ci voted on patch set 6 V +1 09/13/21, 07:40 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/16635

  14. Wouter Wolters voted on patch set 6 CR +1 09/13/21, 17:53

  15. Benni Mack commented on patch set 6 09/14/21, 06:26

    RequestHandler.php:659

    Just by reading... this looks like a change of behaviour
  16. Robert Kärner commented on patch set 6 09/14/21, 06:51

    RequestHandler.php:659 Reply

    I have thought this through, but I might have made a mistake. Let's go through it again together. This is what I think it means: If external is set and is truthy, return false Otherwise, if disableCompression is unset or falsey, return true Otherwise, return false This can be rewritten to: If external is set and is truthy, return false If disableCompression is set and truthy, return false Otherwise, return true Which is what my rewritten code does. And in fact, it still makes sense: A Javascript file should only be compressed when it is NOT external AND compression is NOT disabled.
  17. Robert Kärner commented on patch set 6 09/14/21, 07:05

    RequestHandler.php:444

    This was probably the LOC I spent the most time understanding. Original means: If file is external (set and true), return false Or, if file is inline (set and true), return false Or, if disableCompression is (unset or false), return true Let's change the last line: If file is external (set and true), return false Or, if file is inline (set and true), return false Or, if disableCompression is (set and true), return false Now, let's inverse it using boolean algebra !(a || b) = !a && !b: If file is not external (unset or false) And, if file is not inline (unset or false) And, if disableCompression is (unset or false) Return true Let's check for reasonableness: Only compress a CSS file, if it's not external, not inline and compression is not disabled (= compression is enabled) Sounds good! Did I make a mistake?
  18. Oli Bartsch commented on patch set 6 CR -1 09/14/21, 09:17

    RequestHandler.php:446

    We should fall back to the expected type of addCssFile(). In this case string. This way it will be much easier to introduce strict typing to those functions later. This affects all of those places in this patch.
  19. Robert Kärner commented on patch set 6 09/14/21, 09:23

    RequestHandler.php:446 Reply

    Ack
  1. Robert Kärner uploaded patch set 7 09/14/21, 09:32

  2. core-ci voted on patch set 7 V +1 09/14/21, 09:48 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/16692

  3. Oliver Klee voted on patch set 7 CR +1 09/14/21, 11:14

  4. Georg Ringer uploaded patch set 8 09/15/21, 05:46

  5. core-ci voted on patch set 8 V +1 09/15/21, 06:00 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/16731

  6. Georg Ringer uploaded patch set 9 09/15/21, 07:36

  7. Jochen Roth commented on patch set 9 09/15/21, 07:46

    ContentObjectRenderer.php:3197

    Maybe set the fallback value to `false` for consistency?
  8. core-ci voted on patch set 9 V +1 09/15/21, 07:52 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/16733

  9. Georg Ringer uploaded patch set 10 09/15/21, 07:58

  10. Jochen Roth commented on patch set 9 09/15/21, 07:58

    DebugUtility.php:160

  11. core-ci voted on patch set 10 V +1 09/15/21, 08:11 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/16735

  12. Oliver Klee voted on patch set 10 CR +1 09/15/21, 09:05

  13. Jochen Roth uploaded patch set 11 09/15/21, 14:12

  14. Oliver Klee voted on patch set 11 CR +1 09/15/21, 14:21

  15. core-ci voted on patch set 11 V +1 09/15/21, 14:26 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/16743

  16. Jochen Roth uploaded patch set 12 09/16/21, 11:04

  17. core-ci voted on patch set 12 V +1 09/16/21, 11:16 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/16793

  18. Christian Kuhn voted on patch set 12 V +1 CR +1 09/16/21, 11:18

  19. Oli Bartsch commented on patch set 12 CR -1 09/16/21, 22:22

    ContentObjectRenderer.php:3189

    Should also be checked

    ContentObjectRenderer.php:3189

    superfluous

    AbstractMenuContentObject.php:998

    Should also be checked as in L:980

    AbstractMenuContentObject.php:998

    Should be FALSE

    RequestHandler.php:450

    Would use FALSE here. Makes the intention clear.

    RequestHandler.php:534

    Should be a string fallback

    RequestHandler.php:659 Reply

    Done
  20. Oli Bartsch uploaded patch set 13 09/16/21, 22:26

  21. Oli Bartsch commented on patch set 13 V +1 CR +1 09/16/21, 22:32

    DebugUtility.php:160 Reply

    Done

    ContentObjectRenderer.php:3189 Reply

    Done

    ContentObjectRenderer.php:3189 Reply

    Done

    ContentObjectRenderer.php:3197 Reply

    Done

    AbstractMenuContentObject.php:998 Reply

    Done

    AbstractMenuContentObject.php:998 Reply

    Done

    RequestHandler.php:450 Reply

    Done

    RequestHandler.php:534 Reply

    Done
  22. core-ci voted on patch set 13 V +1 09/16/21, 22:39 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/16835

  23. Christian Kuhn voted on patch set 13 V +1 CR +1 09/16/21, 22:49

  24. Oli Bartsch voted on patch set 13 V +2 CR +2 09/17/21, 00:11

  25. Oli Bartsch merged patch set 14 09/17/21, 00:11