82771[BUGFIX] Undefined array index for TCA without ctrl
Commit message
Review
-
Code review CR +2 Done
- Stefan Bürk +2
- Oliver Klee +1
-
Verified V +2 Done
- Stefan Bürk +2
- Oliver Klee +1
- core-ci +1 CI
Issues 1
Files 7
- typo3/sysext/extbase/Classes/Persistence/Generic/Storage/Typo3DbQueryParser.php2+18 −17
- typo3/sysext/extbase/Tests/Functional/Fixtures/Extensions/blog_example/Classes/Domain/Model/RegistryEntry.phpnew+38 −0
- typo3/sysext/extbase/Tests/Functional/Fixtures/Extensions/blog_example/Classes/Domain/Repository/RegistryEntryRepository.phpnew+27 −0
- typo3/sysext/extbase/Tests/Functional/Fixtures/Extensions/blog_example/Configuration/TCA/tx_blogexample_domain_model_registryentry.phpnew+14 −0
- typo3/sysext/extbase/Tests/Functional/Fixtures/Extensions/blog_example/Resources/Private/Language/locallang_db.xlf+3 −0
- typo3/sysext/extbase/Tests/Functional/Fixtures/Extensions/blog_example/ext_tables.sql2+7 −0
- typo3/sysext/extbase/Tests/Functional/Persistence/Generic/Storage/Typo3DbQueryParserTest.php+22 −0
Review log 3040
Show 1215 earlier messages
-
Simon Schaufelberger uploaded patch set 1 02/02/24, 18:44
-
core-ci voted on patch set 1 V +1 02/02/24, 18:51 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/52645
-
Stefan Bürk voted on patch set 1 CR +1 V +1 02/02/24, 19:11
-
Oliver Klee commented on patch set 1 CR +1 V +1 02/02/24, 20:30
Have you checked whether 11.5 is affected as well? -
Simon Schaufelberger commented on patch set 1 02/02/24, 23:22
Reply
Good point, the code can be fixed there as well. I just didn't get an error because of php7.4 -
Simon Schaufelberger updated the commit message in patch set 2
CR +1V +102/02/24, 23:22 -
core-ci voted on patch set 2 V +1 02/02/24, 23:28 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/52646
-
Simon Schaufelberger commented on patch set 2 02/02/24, 23:30
There is also a missing check on the method "getLanguageStatement". Should I add ``` if (!is_array($GLOBALS['TCA'][$tableName]['ctrl'] ?? null)) { return ''; } ``` there as well? -
Simon Schaufelberger commented on patch set 2 02/02/24, 23:32
Reply
For getVisibilityConstraintStatement it actually exists! -
Stefan Bürk commented on patch set 2 02/03/24, 07:38
Reply
if you are on it, add it. -
Oliver Klee voted on patch set 2 CR +1 V +1 02/03/24, 09:33
-
Simon Schaufelberger commented on patch set 2 CR -1 V -1 02/03/24, 10:15
on it... -
Simon Schaufelberger uploaded patch set 3
CR +1V +102/03/24, 23:35 -
core-ci voted on patch set 3 V +1 02/03/24, 23:40 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/52667
-
Simon Schaufelberger uploaded patch set 4
V +102/04/24, 00:11
-
Simon Schaufelberger commented on patch set 4 02/04/24, 00:13
Reply
DoneReply
DoneAlso added a test to cover this case -
core-ci voted on patch set 4 V +1 02/04/24, 00:18 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/52668
-
Simon Schaufelberger uploaded patch set 5
V +102/04/24, 00:24 -
Simon Schaufelberger commented on patch set 5 02/04/24, 00:25
It's interesting that `empty` ignores the undefined array index which I would have expected that it doesn't do that. -
Simon Schaufelberger uploaded patch set 6 02/04/24, 00:27
-
Simon Schaufelberger wrote 02/04/24, 00:30
Topic set to extbase -
core-ci voted on patch set 5 V +1 02/04/24, 00:30 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/52669
-
Simon Schaufelberger updated the commit message in patch set 7 02/04/24, 00:31
-
core-ci voted on patch set 6 V +1 02/04/24, 00:32 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/52670
-
Simon Schaufelberger uploaded patch set 8 02/04/24, 00:33
-
core-ci voted on patch set 8 V +1 02/04/24, 00:38 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/52672
-
core-ci voted on patch set 7 V +1 02/04/24, 00:39 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/52671
-
Stefan Bürk commented on patch set 8 CR -1 02/04/24, 04:45
Commit message is not sufficient anymore. Please describe the added tests and fixture classes in one sentence. The added `table` surfes which purpose for the `blog example` - it's unrelated and added soly for a test - or am I wrong ?Typo3DbQueryParser.php:762superflous, covered by the `empty()` check. Note: empty() with a undefined array key access does not emit that warning.ext_tables.sql:6suerflous change - unrelated to commit message - and technical irrelevant - samte like the others. Let's keep them as is in the whole file -
Simon Schaufelberger uploaded patch set 9
CR -1V +102/04/24, 16:46 -
Simon Schaufelberger commented on patch set 8 02/04/24, 16:47
Reply
Done - yes, this test is only added to cover this case, otherwise I would need to load one of the other extensions as well, which I could do of course if requested.Typo3DbQueryParser.php:762ReplyDoneext_tables.sql:6ReplyDone -
core-ci voted on patch set 9 V +1 02/04/24, 16:51 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/52691
-
Oliver Klee voted on patch set 9 V +1 02/04/24, 20:09
-
Oliver Klee voted on patch set 9 CR +1 02/04/24, 20:10
-
Simon Schaufelberger updated the commit message in patch set 10
CR +1V +102/04/24, 21:37 -
Oliver Klee voted on patch set 10 CR +1 V +1 02/04/24, 21:40
-
core-ci voted on patch set 10 V +1 02/04/24, 21:42 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/52696
-
Stefan Bürk commented on patch set 10 CR +2 V +2 02/05/24, 12:32
Note: A TCA controlled table without a CTRL section is considerably broken. However, taking this bugfix as it mitigates array key access warnings without changing a behaviour. See issue for comments about the broken and why the described use-case should be rethought. Avoiding array key access warnings however is legit. -
Stefan Bürk voted on patch set 10 CR -1 02/05/24, 12:56
-
Stefan Bürk voted on patch set 10 CR +2 02/07/24, 16:21
-
Stefan Bürk merged patch set 11 02/07/24, 16:21