76761[BUGFIX] Avoid undefined array key access in LanguageMenuProcessor
Commit message
Review
-
Code review CR +2 Done
- Stefan Bürk +2
- Oliver Klee +1
- Christian Kuhn +1
-
Verified V +2 Done
- Stefan Bürk +2
- Christian Kuhn +1
- core-ci +1 CI
Issues 1
Files 1
Review log 1619
-
J. Peter M. Schuler uploaded patch set 1 11/21/22, 16:28
-
Oliver Klee voted on patch set 1 CR +1 11/21/22, 16:29
-
core-ci voted on patch set 1 V +1 11/21/22, 16:39 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/34049
-
Chris Müller voted on patch set 1 CR +1 11/21/22, 18:28
-
Stefan Bürk commented on patch set 1 CR -1 11/22/22, 23:17
Commit messages *must* not exceed a line length of 74 chars. Exception from that rule are basicly "external url/links" if they are needed, as reference or stuff like that. Or eventually full-namespace naming of classes. First line may be excepted also, in some situations. As this patch is "basicly" a default "undefined array key access" issue, the first line may be changed to: ``` [BUGFIX] Avoid undefined array key access in LanguageMenuProcessor ``` Beside this, the commit message can be left out with the suggested new first line, otherwise please reformat to NOT exceed the max of 74 per line. A more "block-styled" commit message is nice to see, but at least the max length should not be exceeded. And in this case it is 2x or 3x overlength. -
J. Peter M. Schuler uploaded patch set 2
CR +1V +111/23/22, 00:19 -
J. Peter M. Schuler commented on patch set 2 11/23/22, 00:20
Reply
Done. Sorry, something really went wrong during that push locally, I just checked this page on the top for the message and the CSS made it look correct. -
Stefan Bürk commented on patch set 2 V +1 CR +1 11/23/22, 00:26
Reply
Everything all-right. I decided to mention it, as I did not know if you were aware of this rule. And it was quite excessive. You may have a look into the core-contribution guide and look for the the `pre-commit hook` which is doing some checks (cgl). And I would tell you if you exceed this level. However, using GUI tools for commiting may not propery show this, as it does not contain a "exit code !== 0". But having that, commit message(change) would be lost if we throw that exit code. See: https://docs.typo3.org/m/typo3/guide-contributionworkflow/main/en-us/Appendix/CommitHook.html#pre-commit-hook However - thank you for taking care and adjusting it. -
core-ci voted on patch set 2 V +1 11/23/22, 00:28 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/34092
-
Chris Müller voted on patch set 2 CR +1 11/23/22, 05:24
-
Oliver Klee voted on patch set 2 CR +1 11/23/22, 07:52
-
Andreas Kienast commented on patch set 2 CR -1 11/23/22, 08:22
LanguageMenuProcessor.php:470I'd rather do an early return here, as we need $language to be non-null at this point anyway. -
J. Peter M. Schuler uploaded patch set 3
CR +1V +111/23/22, 14:24 -
J. Peter M. Schuler commented on patch set 3 11/23/22, 14:26
LanguageMenuProcessor.php:470ReplyDone. To be more clear an maintainable I'd propose `json_encode(null)` then, rather than `'{}'`. Although I would understand if core prefers the opposite. -
core-ci voted on patch set 3 V +1 11/23/22, 14:33 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/34114
-
Oliver Klee voted on patch set 3 CR +1 11/23/22, 15:43
-
Christian Kuhn voted on patch set 3 V +1 CR +1 11/23/22, 15:45
-
Stefan Bürk voted on patch set 3 V +2 CR +2 11/23/22, 16:07
-
Stefan Bürk merged patch set 4 11/23/22, 16:07