Review main Abandoned

75854[BUGFIX] Always send strings to the method createStream

Michael Voehringer CR 0 V 0 Easy +2 −2 updated 09/27/22, 12:30

Commit message

PHP8.1 throws an TypeError if we sending null to createStream

Review

  • Code review CR 0
  • Verified V 0

Issues 1

Files 1

Review log 1418

  1. Michael Voehringer uploaded patch set 1 09/22/22, 13:20

  2. Oliver Klee voted on patch set 1 CR +1 09/22/22, 13:30

  3. core-ci voted on patch set 1 V -1 09/22/22, 13:41 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/31449

  4. Oliver Klee voted on patch set 1 CR 0 09/22/22, 13:42

  5. Chris Müller commented on patch set 1 CR -1 09/22/22, 13:44

    ActionController.php:919

    The string cast has precedence over the null coalescing operator. This changes the behaviour. So use (string)($html ?? $this->view->render())

    ActionController.php:933

    Here too
  6. Andreas Kienast commented on patch set 1 CR -1 09/22/22, 13:45

    I don't understand the bugfix. If the incoming value is null, the null-coalesce operator ensures a rendered template is returned.
  7. Andreas Kienast commented on patch set 1 09/22/22, 13:46

    ActionController.php:919 Reply

    That looks like the correct fix for me, I didn't see your comments when I posted mine before.
  8. Andreas Kienast commented on patch set 2 09/22/22, 13:47

    Published edit on patch set 1.
  9. Andreas Kienast commented on patch set 2 CR -1 09/22/22, 13:48

    Gerrit inline edit is useless when adding parenthesis...
  10. Andreas Kienast uploaded patch set 3 09/22/22, 13:49

  11. Andreas Kienast commented on patch set 3 CR -1 09/22/22, 13:50

    My -1 remains: $this->view->render() always returns a string. Perhaps the issue is caused somewhere in there instead.
  12. core-ci voted on patch set 3 V +1 09/22/22, 13:57 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/31452

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

  14. Michael Voehringer updated the commit message in patch set 4 09/22/22, 18:25

  15. core-ci voted on patch set 4 V +1 09/22/22, 18:33 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/31463

  16. Michael Voehringer commented on patch set 4 09/27/22, 06:18

    Reply

    No, it did not always return a string. In TPYO3 11.5.16 the return type is not defined. Looks like it's fix in main. I now change the Releases to 11.5 only. How to proceed if I want to have the patch in the 11.5 branch (It is my first patch for T3)?

    ActionController.php:919 Reply

    Ack

    ActionController.php:933 Reply

    Done
  17. Oliver Klee commented on patch set 4 09/27/22, 07:03

    Reply

    The workflow is that you create a new change against the 11.5 branch (with the same changes) and use the "Releases: 11.5" line you're already using here. (And congratulations to your first core code contribution!)
  18. Michael Voehringer abandoned the change 09/27/22, 12:30

    Use wrong branch, should be 11.5