Review main Merged

75025[BUGFIX] Avoid undefined array key access in DataMapFactory

Francois Suter CR +2 V +2 Easy +5 −2 updated 07/04/22, 19:20

Commit message

In two places \TYPO3\CMS\Extbase\Persistence\Generic\Mapper\DataMapFactory
accesses the TCA for some table without checking if it exists.

Review

  • Code review CR +2 Done
    • Benni Mack +2
    • Oliver Klee +1
    • Markus Klein +1
    • Simon Schaufelberger +1
  • Verified V +2 Done
    • Benni Mack +2
    • Markus Klein +1
    • Simon Schaufelberger +1
    • core-ci +1 CI

Issues 1

Files 1

Review log 1315

  1. Francois Suter uploaded patch set 1 07/04/22, 14:55

  2. Markus Klein commented on patch set 1 07/04/22, 14:59

    DataMapFactory.php:224

    How do you end up here if TCA is not defined at all? I mean extbase without TCA does not work, right?
  3. core-ci voted on patch set 1 V +1 07/04/22, 15:04 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/28632

  4. Francois Suter commented on patch set 1 07/04/22, 15:05

    I have described the scenario in the Forge ticket: https://forge.typo3.org/issues/97853

    DataMapFactory.php:224 Reply

    I have described the scenario in the Forge ticket: https://forge.typo3.org/issues/97853
  5. Oliver Klee commented on patch set 1 07/04/22, 15:16

    DataMapFactory.php:223

    Usually, the ctrl section is an array (if I'm not mistaken). So I'd prefer us to not introduce the string type here, and use either an empty array or null as the fallback value for "no ctrl section".
  6. Francois Suter commented on patch set 1 07/04/22, 15:18

    DataMapFactory.php:223 Reply

    Sounds good. I'll update my patch.
  7. Francois Suter uploaded patch set 2 07/04/22, 15:20

  8. core-ci voted on patch set 2 V +1 07/04/22, 15:28 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/28634

  9. Oliver Klee voted on patch set 2 CR +1 07/04/22, 15:29

  10. Simon Schaufelberger voted on patch set 2 V +1 CR +1 07/04/22, 15:35

  11. Markus Klein commented on patch set 2 07/04/22, 16:15

    DataMapFactory.php:224 Reply

    Still, sounds like a bug somewhere else, this being a symptom only. Still, change is fine with me, of course.
  12. Markus Klein voted on patch set 2 V +1 CR +1 07/04/22, 16:16

  13. Benni Mack voted on patch set 2 V +2 CR +2 07/04/22, 17:46

  14. Benni Mack merged patch set 3 07/04/22, 17:46

  15. Francois Suter commented on patch set 3 07/04/22, 19:20

    Thanks to all for taking care.