Review main Merged

72058[BUGFIX] Fix undefined key warning in EXT:frontend with PHP8

Florian Rival CR +2 V +2 Easy +12 −7 updated 11/09/21, 18:47

Commit message

When using a text content element with a table inside bodytext,
you will have a PHP warning: Undefined array key "1." in
typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php

This was only a notice with PHP v7 but it's an error with PHP v8.
This bugfix corrects the usage of undefined array keys.

Review

  • Code review CR +2 Done
    • Christian Kuhn +2
    • Nikita Hovratov +1
    • Benni Mack +1
  • Verified V +2 Done
    • Christian Kuhn +2
    • Nikita Hovratov +1
    • core-ci +1 CI

Issues 1

Files 1

Review log 1519

  1. Florian Rival uploaded patch set 1 11/05/21, 10:35

  2. Andreas Kienast voted on patch set 1 V +1 CR +1 11/05/21, 10:43

  3. core-ci voted on patch set 1 V -1 11/05/21, 10:54 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/18936

  4. Oli Bartsch commented on patch set 1 11/05/21, 10:57

    ContentObjectRenderer.php:3481

    Are you sure with this change?
  5. core-ci voted on patch set 1 V +1 11/05/21, 12:46 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/18936

  6. Florian Rival commented on patch set 1 11/05/21, 13:55

    ContentObjectRenderer.php:3481 Reply

    Not really sure for that one, could also be 'false' instead of empty string because the only test with this value is a check to assert it's an array (line 3482) is_array($stdWrap).
  7. Andreas Kienast commented on patch set 1 11/05/21, 15:39

    ContentObjectRenderer.php:3481 Reply

    I'd go with `null` then
  8. Andreas Kienast uploaded patch set 2 11/05/21, 15:45

  9. Andreas Kienast voted on patch set 2 V +1 CR +1 11/05/21, 15:46

  10. core-ci voted on patch set 2 V +1 11/05/21, 16:14 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/18961

  11. Benni Mack commented on patch set 1 CR -1 11/05/21, 16:33

    ContentObjectRenderer.php:3481 Reply

    it's wrong. it's "tagStdWrap" but before it was stdWrap. please fix
  12. Andreas Kienast uploaded patch set 3 11/05/21, 16:39

  13. core-ci voted on patch set 3 V +1 11/05/21, 16:54 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/18964

  14. Benni Mack voted on patch set 3 CR +1 11/05/21, 19:50

  15. Benni Mack commented on patch set 3 11/05/21, 19:50

    ContentObjectRenderer.php:3481 Reply

    Done
  16. Christian Kuhn voted on patch set 3 V +1 CR +1 11/09/21, 17:11

  17. Nikita Hovratov voted on patch set 3 V +1 CR +1 11/09/21, 18:36

  18. Christian Kuhn voted on patch set 3 V +2 CR +2 11/09/21, 18:47

  19. Christian Kuhn merged patch set 4 11/09/21, 18:47