Review main Merged

76005[BUGFIX] Avoid undefined array key access in TextMenuContentObject

Stefan Bürk CR +2 V +2 Easy +3 −1 updated 10/10/22, 13:24

Commit message

Review

  • Code review CR +2 Done
    • Stefan Bürk +2
    • Oliver Klee +1
    • Christian Kuhn +1
    • Andreas Kienast +1
  • Verified V +2 Done
    • Stefan Bürk +2
    • Christian Kuhn +1
    • Andreas Kienast +1
    • core-ci +1 CI

Issues 1

Files 1

Review log 1417

  1. Stefan Bürk uploaded patch set 1 10/08/22, 00:38

  2. core-ci voted on patch set 1 V +1 10/08/22, 00:45 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/32091

  3. Oliver Klee commented on patch set 1 10/08/22, 07:49

    TextMenuContentObject.php:92

    I find this line really hard to read and understand (due to the combined ?? and ?: operators and multiple parenthesis) - and hence to review. Please let's introduce a local variable so we spread the ?? and ?: into two statements.
  4. Stefan Bürk commented on patch set 1 10/08/22, 10:56

    TextMenuContentObject.php:92 Reply

    Time for a "??:" operator. "if null or falsable then..." Will change it.
  5. Oliver Klee commented on patch set 1 10/08/22, 11:32

    TextMenuContentObject.php:92 Reply

    Other thoughts on this: - We probably want to throw in a string cast for good measure to avoid type warnings for the explode call if the TypoScript has bugs in it. - Instead of checking for truthyness/falsyness, we probably want to check for an empty string, which is semantically more correct.
  6. Stefan Bürk uploaded patch set 2 10/08/22, 12:12

  7. Oliver Klee commented on patch set 2 10/08/22, 12:14

    TextMenuContentObject.php:92 Reply

    On it.
  8. Oliver Klee commented on patch set 3 10/08/22, 12:16

    Published edit on patch set 2.
  9. Oliver Klee commented on patch set 3 10/08/22, 12:16

    TextMenuContentObject.php:92 Reply

    Done
  10. core-ci voted on patch set 2 V +1 10/08/22, 12:20 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/32099

  11. Stefan Bürk commented on patch set 3 10/08/22, 12:20

    Thanks Oliver. Changes are fine for me.
  12. core-ci voted on patch set 3 V +1 10/08/22, 12:24 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/32100

  13. Christian Kuhn voted on patch set 3 V +1 CR +1 10/08/22, 12:36

  14. Oliver Klee voted on patch set 3 CR +1 10/08/22, 12:40

  15. Andreas Kienast voted on patch set 3 V +1 CR +1 10/10/22, 12:50

  16. Stefan Bürk voted on patch set 3 V +2 CR +2 10/10/22, 13:24

  17. Stefan Bürk merged patch set 4 10/10/22, 13:24