Review 12.4 Merged

85463[BUGFIX] Prevent PHP array access errors on invalid shortcut entries

Stefan Bürk CR +2 V +2 Easy +3 −3 updated 08/07/24, 17:21

Commit message

If an invalid record in `sys_be_shortcuts` is stored like this:

```
INSERT INTO sys_be_shortcuts (userid,route,arguments)
     VALUES (1,'record_edit','[]');
```

then the backend cannot be accessed anymore due to PHP
errors due to unguarded array key access of the
"arguments" contents.

This patch guards the array key access to prevent such
a situation, so an invalid shortcut can be deleted from
the menu.

Database records like this might happen for migrated older
installations.

Review

  • Code review CR +2 Done
    • Stefan Bürk +2
  • Verified V +2 Done
    • Stefan Bürk +2
    • core-ci +1 CI

Issues 1

Files 1

Review log 34

  1. Stefan Bürk commented on patch set 1 08/07/24, 16:48

    Cherry Picked from branch main.
  2. core-ci voted on patch set 1 V +1 08/07/24, 16:54 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/63006

  3. Stefan Bürk voted on patch set 1 CR +2 V +2 08/07/24, 17:21

  4. Stefan Bürk merged patch set 2 08/07/24, 17:21