Review 13.4 Merged

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

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

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
  • Verified V +2 Done
    • Garvin Hicking +2
    • core-ci +1 CI

Issues 1

Files 1

Review log 45

  1. Garvin Hicking commented on patch set 1 01/24/25, 13:10

    Cherry Picked from branch main.
  2. Garvin Hicking marked it work in progress 01/24/25, 13:11

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

  4. Garvin Hicking commented on patch set 1 CR +2 V +2 01/25/25, 08:02

    This change is ready for review.
  5. Garvin Hicking merged patch set 2 01/25/25, 08:02