Review main Merged

74387[BUGFIX] Check parsed option in EmailFinisher

Oli Bartsch CR +2 V +2 Easy +4 −0 updated 04/25/22, 19:24

Commit message

To prevent PHP warnings for passing invalid
arguments to "foreach", the parsed option
is now checked to be a non empty array.

Review

  • Code review CR +2 Done
    • Oli Bartsch +2
    • Oliver Klee +1
    • Stefan Bürk +1
    • Nikita Hovratov +1
  • Verified V +2 Done
    • Oli Bartsch +2
    • Stefan Bürk +1
    • Nikita Hovratov +1
    • core-ci +1 CI

Issues 1

Files 1

Review log 89

  1. Oli Bartsch uploaded patch set 1 04/25/22, 12:00

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

  3. Stefan Bürk voted on patch set 1 V +1 CR +1 04/25/22, 12:10

  4. Oliver Klee commented on patch set 1 04/25/22, 12:39

    EmailFinisher.php:237

    The is_array check should be enough (without the check for emptiness) as a foreach over an empty array is a no-op.
  5. Oli Bartsch commented on patch set 1 04/25/22, 13:15

    EmailFinisher.php:237 Reply

    Yes true. However, such early return makes the code IMO clear and easier to understand. (We do this the same way in all the TCA migrations). I therefore would like to keep it this way.
  6. Oliver Klee commented on patch set 1 CR +1 04/25/22, 13:18

    EmailFinisher.php:237 Reply

    Ack
  7. Nikita Hovratov voted on patch set 1 V +1 CR +1 04/25/22, 16:18

  8. Oli Bartsch voted on patch set 1 V +2 CR +2 04/25/22, 19:24

  9. Oli Bartsch merged patch set 2 04/25/22, 19:24