Review main Merged

87875[BUGFIX] Fix PHP error undefined array key 'ctrl' in NewRecordController

Garvin Hicking CR +2 V +2 Easy +4 −4 updated 01/25/25, 08:01

Commit message

When having a TCA specification as in [1], which is specifically
tested to not require a "ctrl" key in TCA [2], this will lead
to a PHP error in the backend's NewRecordController:

```
PHP Warning: Undefined array key "ctrl" in NewRecordController.php
line 599
```

This patch inserts guards at places where "ctrl" would otherwise
be accessed with the assumption this key always exists.

[1] EXT:extbase/Tests/Functional/Fixtures/Extensions/blog_example/Configuration/TCA/tx_blogexample_domain_model_registryentry.php
[2] TYPO3\CMS\Extbase\Tests\Functional\Persistence\Generic\Storage\Typo3DbQueryParserTest::tcaWithoutCtrlCreatesAValidSQLStatement

Review

  • Code review CR +2 Done
    • Garvin Hicking +2
    • Anja Leichsenring +1
    • Stefan Bürk +1
    • Benni Mack +1
  • Verified V +2 Done
    • Garvin Hicking +2
    • Anja Leichsenring +1
    • Stefan Bürk +1
    • core-ci +1 CI

Issues 1

Files 1

Review log 89

  1. Garvin Hicking uploaded patch set 1 01/24/25, 13:09

  2. Garvin Hicking marked it work in progress 01/24/25, 13:11

  3. Garvin Hicking marked it ready for review 01/24/25, 13:11

  4. core-ci voted on patch set 1 V +1 01/24/25, 13:17 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/72973

  5. Anja Leichsenring voted on patch set 1 CR +1 V +1 01/24/25, 13:34

  6. Stefan Bürk voted on patch set 1 CR +1 V +1 01/24/25, 17:20

  7. Benni Mack voted on patch set 1 CR +1 01/24/25, 19:28

  8. Garvin Hicking voted on patch set 1 CR +2 V +2 01/25/25, 08:01

  9. Garvin Hicking merged patch set 2 01/25/25, 08:01