90855[BUGFIX] Ensure record within context menu record providers is an array
Commit message
Test this change
Run a command in your clone of the TYPO3 Core. Then try what the change does and vote on Verified in Gerrit. How to review a patch
- Check out patch set 3
-
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/55/90855/3 && git checkout FETCH_HEAD - Cherry-pick onto main
-
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/55/90855/3 && git cherry-pick FETCH_HEAD
Review
-
Code review CR +1 Needs a vote
- Georg Ringer +1
-
Verified V +1 Needs a vote
- Georg Ringer +1
- core-ci +1 CI
Merge conflicts 1
Issues 1
Files 1
Review log 1215
-
Elias Häußler uploaded patch set 1 10/01/25, 10:05
-
core-ci voted on patch set 1 V +1 10/01/25, 10:12 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/85798
-
Oliver Klee voted on patch set 1 CR +1 10/01/25, 14:27
-
Oliver Klee commented on patch set 1 10/01/25, 14:28
Can we cover this with a (functional) test? -
Benni Mack commented on patch set 1 CR +1 V +1 10/01/25, 15:07
I wonder why phpstan didn't detect this. -
Oliver Klee commented on patch set 1 10/01/25, 15:30
Reply
Educated guess: This might be due to the PHPStan level we're currently at (level 6). -
Oli Bartsch commented on patch set 1 CR +1 V +1 10/01/25, 15:59
Reply
Hi, I'm not quite sure what we could test here. getRecordWSOL() returns ?array. So using `?? []` does always lead to $this->record being an array. I think this patch is fine this way. However, I will not merge yet to allow you adjustments, if you like. -
Oliver Klee commented on patch set 1 10/01/25, 16:12
Reply Unresolved
> I'm not quite sure what we could test here. I was thinking along the lines of a regression test, i.e., a test that fails without the fix and that passes with it. I don't know the code well enough to come up with a scenario (including calls) where this bug might get triggered, though. @elias@haeussler.dev Do you happen to know which calls could trigger this bug? -
Garvin Hicking commented on patch set 1 10/01/25, 18:58
Unresolved
I'm afraid this fix may have follow-up errors. While creating a functional test I saw that the whole provider for example directly accesses `$this->record['pid']` in for example `initializePermissions()` which does not check the array for a valid key. That method is called via `initialize()` directly. So there would be more to do to gate this method against a missing page object I believe. Please see https://review.typo3.org/c/Packages/TYPO3.CMS/+/90859 for the test I tried to setup. You can also search for usages of $this->record in RecordProvider or PageProvider to see that there are various instances of direct access to $record. Too tired for now to think of a solution, but wanted to share my finding. -
Benni Mack wrote 04/21/26, 15:02
Removed reviewer Benni Mack with the following votes: * Verified+1 by Benni Mack * Code-Review+1 by Benni Mack -
Benni Mack updated the commit message in patch set 2
CR +1V +104/22/26, 06:54 -
core-ci voted on patch set 2 V -1 04/22/26, 11:34 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/100825
-
Benni Mack rebased onto patch set 3
V -110/02/26, 06:59 -
core-ci voted on patch set 3 V +1 10/02/26, 07:10 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/109874
-
Georg Ringer voted on patch set 3 CR +1 V +1 11/13/26, 12:57