Review main Merged

68802[BUGFIX] Harden RootlineUtility::enrichWithRelationFields

Oliver Klee CR +2 V +2 Easy +49 −0 updated 05/12/21, 16:58

Commit message

In some rare cases (e.g., for some Console commands),
RootlineUtility::enrichWithRelationFields might be run without
any TCA, which leads to a crash. This is now avoided.

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 2

Review log 2435

Show 510 earlier messages
  1. Oliver Klee uploaded patch set 1 04/19/21, 20:15

  2. TYPO3com voted on patch set 1 V +1 04/19/21, 20:23 Completed build in 07m 49s on Mon, 19 Apr, 08:23 PM Test Summary: 33307 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-10741

  3. core-ci voted on patch set 1 V +1 04/19/21, 20:28 Core CI is happy: https://core.b13.com/typo3-core/typo3.cms/-/pipelines/2349

  4. Oliver Klee updated the commit message in patch set 2 04/20/21, 12:16

  5. TYPO3com voted on patch set 2 V +1 04/20/21, 12:24 Completed build in 07m 45s on Tue, 20 Apr, 12:24 PM Test Summary: 33307 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-10756

  6. core-ci voted on patch set 2 V +1 04/20/21, 12:27 Core CI is happy: https://core.b13.com/typo3-core/typo3.cms/-/pipelines/2367

  7. Benni Mack commented on patch set 2 04/20/21, 12:46

    Hey @oli, how can I test this?
  8. Oliver Klee commented on patch set 2 04/21/21, 18:42

    Reply

    This is on a non-public customer project of mine which I unfortunately cannot share. (And I haven't been able to reproduce the crash on a demo project without spending too much time on creating it.) However, I think it should be possible to review this change by code reading: Before foreach-ing over an array element, we need to make sure that we can iterate over it, i.e., that the array element exists and is iterable (in this case, an array).
  9. Oliver Klee updated the commit message in patch set 3 04/22/21, 10:44

  10. TYPO3com voted on patch set 3 V +1 04/22/21, 10:50 Completed build in 06m 43s on Thu, 22 Apr, 10:50 AM Test Summary: 33307 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-10795

  1. core-ci voted on patch set 3 V +1 04/22/21, 11:06 Core CI is happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/10592

  2. Anja Leichsenring commented on patch set 3 V +1 CR +1 04/27/21, 16:55

    looks obvious, but I'd rather not have it in v9. It is by no means a critical bug.
  3. Oliver Klee updated the commit message in patch set 4 04/27/21, 16:56

  4. Oliver Klee commented on patch set 4 04/27/21, 16:56

    Thanks, I've removed V9 from the releases line now.
  5. Benni Mack rebased onto patch set 5 04/28/21, 08:01

  6. core-ci voted on patch set 5 V +1 04/28/21, 08:14 Core CI is happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/10823

  7. Benni Mack voted on patch set 5 V +1 CR +1 04/28/21, 08:30

  8. Oli Bartsch commented on patch set 5 04/28/21, 10:52

    While this patch looks good, I'm not able to reproduce it. Would be great to have a test, e.g. which unsets TCA and then fails without this patch applied. AFAICS there is already a functional test setup for RootlineUtiltiy which may just need to be extended.
  9. Oliver Klee commented on patch set 5 04/29/21, 18:18

    Reply

    > Would be great to have a test, e.g. which unsets TCA and then fails without this patch applied. Will do.
  10. Oliver Klee uploaded patch set 6 05/08/21, 18:21

  11. Oliver Klee commented on patch set 6 05/08/21, 18:22

    Unfortunately, I have not been able to get this to fail with a test. However, still I think this check is the "right thing to do" here, and I've added tests to make sure this change does not break anything.
  12. core-ci voted on patch set 6 V -1 05/08/21, 18:23 Core CI is not happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/11317

  13. Oliver Klee uploaded patch set 7 05/08/21, 18:26

  14. core-ci voted on patch set 7 V -1 05/08/21, 18:41 Core CI is not happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/11318

  15. Oliver Klee commented on patch set 7 V -1 05/08/21, 20:04

    The tests seem to need some changes for SQLite. On it.
  16. Oliver Klee uploaded patch set 8 05/08/21, 22:45

  17. core-ci voted on patch set 8 V +1 05/08/21, 22:57 Core CI is happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/11319

  18. Andreas Kienast commented on patch set 8 05/09/21, 10:14

    RootlineUtility.php:283

    Under which conditions is this the case? This looks like purposely broken TCA to me.
  19. Oliver Klee commented on patch set 8 05/09/21, 11:03

    RootlineUtility.php:283 Reply Unresolved

    Under normal circumstances, this will not be set to a non-array. However, for the sake of correctness (and the sake of static code analysis that does not know what "correct TCA" is), I'd like this code to not crash with an unrelated error message if the TCA is not correct.
  20. Christian Kuhn updated the commit message in patch set 9 05/12/21, 13:22

  21. Christian Kuhn voted on patch set 9 V +1 CR +1 05/12/21, 13:22

  22. Oli Bartsch voted on patch set 9 V +2 CR +2 05/12/21, 13:25

  23. core-ci voted on patch set 9 V +1 05/12/21, 13:33 Core CI is happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/11438

  24. Oli Bartsch merged patch set 10 05/12/21, 13:38

  25. Oliver Klee commented on patch set 10 05/12/21, 16:58

    @Christian: Thanks for removing 9.5 again! (I had accidentally put it back in the releases line with my push.)