Review main Merged

75592[BUGFIX] Avoid undefined array key in RecordLinkHandler

Kevin Appelt CR +2 V +2 Easy +1 −1 updated 09/16/22, 10:49

Commit message

Review

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

Issues 1

Files 1

Review log 1518

  1. Kevin Appelt uploaded patch set 1 08/31/22, 11:47

  2. Oliver Klee updated the commit message in patch set 2 08/31/22, 11:50

  3. Oliver Klee voted on patch set 2 CR +1 08/31/22, 11:50

  4. core-ci voted on patch set 1 V +1 08/31/22, 11:54 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/30558

  5. core-ci voted on patch set 2 V +1 08/31/22, 11:57 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/30559

  6. Nikita Hovratov commented on patch set 2 08/31/22, 12:38

    RecordLinkHandler.php:119

    This only checks for null now, but not for falsy values like empty string. Better is to use: ($linkParts['title'] ?? '') ?: BackendUtility::getRecordTitle
  7. Oliver Hader commented on patch set 2 CR -1 09/01/22, 09:34

    RecordLinkHandler.php:119 Reply

    I'd suggest `!empty($linkParts['title']) ? $linkParts['title'] : BackendUtility::getRecordTitle($table, $record)`
  8. Kevin Appelt uploaded patch set 3 09/06/22, 14:02

  9. Oliver Klee voted on patch set 3 CR +1 09/06/22, 14:04

  10. core-ci voted on patch set 3 V +1 09/06/22, 14:09 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/30650

  11. Kevin Appelt commented on patch set 3 09/06/22, 15:20

    RecordLinkHandler.php:119 Reply

    Done
  12. Oliver Hader voted on patch set 3 CR +1 09/07/22, 06:57

  13. Oliver Hader commented on patch set 3 09/07/22, 07:17

    I tried to test it, but could not reproduce the reported misbehavior. The corresponding link handler gets data from `TypoLinkCodecService::decode` which seems to always contain the `title` index.
  14. Oliver Hader commented on patch set 3 09/07/22, 07:18

    So, I could not reproduce the bug.
  15. Oliver Hader voted on patch set 3 V +1 09/12/22, 20:52

  16. Oliver Hader commented on patch set 3 09/12/22, 20:53

    I still could not reproduce the bug, however the change works... thus +1
  17. Christian Kuhn voted on patch set 3 V +2 CR +2 09/16/22, 10:49

  18. Christian Kuhn merged patch set 4 09/16/22, 10:49