Review main Merged

70846[TASK] Fix undefined array key warning in free mode

Nikita Hovratov CR +2 V +2 Easy +1 −1 updated 09/11/21, 10:52

Commit message

$rowsByLang[0] is not set, if editing a content element without a
language source. A check for existence is added to prevent warnings in
PHP 8.

Review

  • Code review CR +2 Done
    • Christian Kuhn +2
    • Georg Ringer +1
    • Oliver Klee +1
  • Verified V +2 Done
    • Christian Kuhn +2
    • Georg Ringer +1
    • core-ci +1 CI

Issues 1

Files 1

Review log 78

  1. Nikita Hovratov uploaded patch set 1 08/31/21, 15:32

  2. core-ci voted on patch set 1 V +1 08/31/21, 15:51 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/15953

  3. Georg Ringer voted on patch set 1 V +1 CR +1 09/01/21, 09:50

  4. Oli Bartsch commented on patch set 1 09/10/21, 00:28

    EditDocumentController.php:2175

    Will also trigger the warning, right? Generating this link, without a default record, makes IMO no sense anyways. Please have a look at https://review.typo3.org/c/Packages/TYPO3.CMS/+/70979 which skips options without a default record completely.
  5. Oli Bartsch commented on patch set 1 09/10/21, 09:30

    EditDocumentController.php:2175 Reply

    Will not trigger a warning since there is the `array_key_exists`. However, this therefore still don't make sense to create the $redirectUrl, since the option will then be skipped anyways.
  6. Oliver Klee voted on patch set 1 CR +1 09/10/21, 09:51

  7. Christian Kuhn commented on patch set 1 V +2 CR +2 09/11/21, 10:52

    EditDocumentController.php:2175 Reply

    could be cleaned with a dedicated patch. imho patch as is is fine.
  8. Christian Kuhn merged patch set 2 09/11/21, 10:52