Review main Merged

73175[BUGFIX] Fix undefined key warning in cObj->imageLinkWrap

Robert Kärner CR +2 V +2 Normal +227 −10 updated 02/07/22, 08:44

Commit message

The default configuration for JSWindow in
lib.contentElement doesn't contain the params
property, so after stdWrapping it in
ContentObjectRenderer, it becomes an empty string.

Thus, exploding it needs a fallback to prevent
PHP 8.0 undefined array key warnings.

In addition, first tests have been added for
cObj->imageLinkWrap, which cover this warning. These
tests have also found another warning for
JSwindow.altUrl_noDefaultParams, which is also
fixed now.

Review

  • Code review CR +2 Done
    • Christian Kuhn +2
    • Oliver Klee +1
    • Robert Kärner +1
    • Stefan Bürk +1
  • Verified V +2 Done
    • Christian Kuhn +2
    • Stefan Bürk +1
    • core-ci +1 CI

Issues 2

Files 4

Review log 2132

Show 47 earlier messages
  1. Robert Kärner uploaded patch set 1 01/26/22, 09:10

  2. core-ci voted on patch set 1 V -1 01/26/22, 09:13 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/22554

  3. Robert Kärner uploaded patch set 2 01/26/22, 09:19

  4. Robert Kärner uploaded patch set 3 01/26/22, 09:21

  5. Robert Kärner commented on patch set 3 01/26/22, 09:23

    ContentObjectRenderer.php:1081

    When there's no JSWindow.params configuration, $windowParams is an empty string after stdWrapping. Exploding this on '=' results in $paramKey being an empty string, and $paramValue being null. Adding if ($paramKey === '') { continue; } is a change in behaviour, but IMO a parameter might be empty, but should always have a name. Open for different opinions on this.
  6. core-ci voted on patch set 2 V +1 01/26/22, 09:32 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/22555

  7. core-ci voted on patch set 3 V +1 01/26/22, 09:35 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/22556

  1. Nikita Hovratov uploaded patch set 4 01/28/22, 22:04

  2. core-ci voted on patch set 4 V -1 01/28/22, 22:06 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/22638

  3. Nikita Hovratov commented on patch set 4 V +1 CR +1 01/28/22, 22:08

    Hey, I added tests for ContentObjectRenderer->imageLinkWrap to verify the patch. Also found another warning by that :)
  4. Nikita Hovratov uploaded patch set 5 01/28/22, 22:09

  5. Nikita Hovratov voted on patch set 5 V +1 CR +1 01/28/22, 22:12

  6. core-ci voted on patch set 5 V +1 01/28/22, 22:20 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/22639

  7. Nikita Hovratov uploaded patch set 6 01/29/22, 11:17

  8. core-ci voted on patch set 6 V +1 01/29/22, 11:38 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/22653

  9. Christian Kuhn uploaded patch set 7 02/05/22, 09:16

  10. Christian Kuhn commented on patch set 7 02/05/22, 09:16

    rebased. phpstan now found 2 violations in the test ;)
  11. core-ci voted on patch set 7 V +1 02/05/22, 09:26 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/23045

  12. Oliver Klee commented on patch set 7 CR -1 02/05/22, 11:51

    -1 so we don't forget to resolve the PHPStan warnings first.
  13. Nikita Hovratov uploaded patch set 8 02/05/22, 15:07

  14. Oliver Klee voted on patch set 8 CR +1 02/05/22, 15:14

  15. core-ci voted on patch set 8 V -1 02/05/22, 15:19 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/23074

  16. core-ci commented on patch set 8 02/05/22, 15:29 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/23074

  17. core-ci commented on patch set 8 02/05/22, 19:01 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/23074

  18. Nikita Hovratov uploaded patch set 9 02/05/22, 21:20

  19. core-ci voted on patch set 9 V +1 02/05/22, 21:33 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/23075

  20. Christian Kuhn voted on patch set 9 V +1 CR +1 02/05/22, 22:14

  21. Oliver Klee voted on patch set 9 CR +1 02/05/22, 23:31

  22. Stefan Bürk voted on patch set 9 V +1 CR +1 02/06/22, 13:56

  23. Robert Kärner voted on patch set 9 CR +1 02/07/22, 06:50

  24. Christian Kuhn voted on patch set 9 V +2 CR +2 02/07/22, 08:44

  25. Christian Kuhn merged patch set 10 02/07/22, 08:44