Project

General

Profile

Actions

Task #98321

closed

Address "undefined array key" issues for PHP 8

Added by Oliver Hader about 2 years ago. Updated over 1 year ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Code Cleanup
Target version:
-
Start date:
2022-09-10
Due date:
% Done:

100%

Estimated time:
(Total: 0.00 h)
TYPO3 Version:
11
PHP Version:
Tags:
Complexity:
Sprint Focus:

Description

I'm pretty sure there are still a bunch of "undefined array key" warnings hidden in the TYPO3 core when used in combination with PHP 8.

To identify and address those issues, I created a PsalmPHP plugin tweaking some static code analysis topics (e.g. static/self references, or ignoring $GLOBALS) for creating a list with potential code locations that could be enhanced. This list is quite long and some aspects might feel okayish... Anyway, I'm just posting the results as TXT and SARIF file.

Processing

# process with max. 1 thread
bin/psalm --memory-limit=8G --threads=1 --no-cache \
    --report=results.sarif --output-format=github

# Visual Studio Code SARIF needs special JSON and absolute paths
(@sed@ on macOS neeeds `-i ''`, on Linux just `-i`)
sed -i '' \
    -e 's,\\/,/,g' \
    -e's,{"uri":"typo3/,{"uri":"'"$(pwd)"'/typo3/,g' results.sarif

Tools

Subtasks

The subtasks of this issue are basically all system extensions, that have been approached systematically. Arbitrary one-liners can be referenced, but not added as subtasks.


Files

undefined-array-index.txt (2.38 MB) undefined-array-index.txt Oliver Hader, 2022-09-09 16:23
undefined-array-index.sarif (2.33 MB) undefined-array-index.sarif Oliver Hader, 2022-09-09 16:23

Subtasks 9 (0 open9 closed)

Task #98324: Address "undefined array key" issues in ext:adminpanelClosed2022-09-10

Actions
Task #98325: Address "undefined array key" issues in ext:belogClosed2022-09-10

Actions
Task #98329: Prevent undefined array key warnings in ext:dashboardClosed2022-09-11

Actions
Task #98347: Prevent undefined array key warnings in ext:beuserClosed2022-09-15

Actions
Task #98407: Prevent undefined array key warnings in ext:extbaseRejected2022-09-22

Actions
Task #98408: Prevent undefined array key warnings in ext:extensionmanagerRejected2022-09-22

Actions
Task #98409: Prevent undefined array key warnings in ext:formRejected2022-09-22

Actions
Task #98410: Prevent undefined array key warnings in ext:feloginRejected2022-09-22

Actions
Task #98411: Prevent undefined array key warnings in ext:filelistClosed2022-09-22

Actions

Related issues 9 (0 open9 closed)

Related to TYPO3 Core - Bug #98361: PHP Warning: Undefined array key "_CURRENT_VERSION" in WorkspaceVersionRecordsCommandClosedDaniel Siepmann2022-09-16

Actions
Related to TYPO3 Core - Bug #98337: Undefined array key "_CURRENT_VERSION" in WorkspaceVersionRecordsCommandClosedDaniel Siepmann2022-09-13

Actions
Related to TYPO3 Core - Bug #98358: Undefined array key "exec" in ExtensionManagementUtilityClosedDaniel Siepmann2022-09-16

Actions
Related to TYPO3 Core - Bug #98359: PHP Warning: Undefined array key 0 in SchedulerCommand.phpClosedDaniel Siepmann2022-09-16

Actions
Related to TYPO3 Core - Bug #97619: Undefined array key "_CURRENT_VERSION" in CleanFlexFormsCommandClosed2022-05-12

Actions
Related to TYPO3 Core - Bug #98387: PHP Warning: Undefined array key "XYZ" in File line 184ClosedDaniel Siepmann2022-09-21

Actions
Related to TYPO3 Core - Bug #98406: PHP Warning: Undefined array key X in AbstractItemProviderClosedDaniel Siepmann2022-09-22

Actions
Related to TYPO3 Core - Bug #98274: Undefined array key "skipIfValueIsEmpty" in SaveToDatabaseFinisher (PHP 8)Closed2022-09-07

Actions
Related to TYPO3 Core - Bug #98412: PHP Warning: Undefined array key "xyz" in ProcessedFileClosedDaniel Siepmann2022-09-22

Actions
Actions #1

Updated by Oliver Hader about 2 years ago

  • Tracker changed from Bug to Task
Actions #2

Updated by Gerrit Code Review about 2 years ago

  • Status changed from New to Under Review

Patch set 1 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/75682

Actions #3

Updated by Oliver Hader about 2 years ago

  • Subtask #98324 added
Actions #4

Updated by Oliver Hader about 2 years ago

  • Subtask #98325 added
Actions #5

Updated by Gerrit Code Review about 2 years ago

Patch set 2 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/75682

Actions #6

Updated by Oliver Hader about 2 years ago

  • Description updated (diff)
Actions #7

Updated by Oliver Hader about 2 years ago

  • Description updated (diff)
Actions #8

Updated by Oliver Hader about 2 years ago

  • Description updated (diff)
Actions #9

Updated by Oliver Hader about 2 years ago

  • Subtask #98329 added
Actions #10

Updated by Gerrit Code Review about 2 years ago

Patch set 3 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/75682

Actions #11

Updated by Oliver Hader about 2 years ago

  • Subtask #98347 added
Actions #12

Updated by Daniel Siepmann about 2 years ago

  • Subtask #98361 added
Actions #13

Updated by Daniel Siepmann about 2 years ago

  • Subtask #98359 added
Actions #14

Updated by Daniel Siepmann about 2 years ago

  • Subtask #98358 added
Actions #15

Updated by Daniel Siepmann about 2 years ago

  • Subtask #98337 added
Actions #16

Updated by Daniel Siepmann about 2 years ago

  • Subtask #97619 added
Actions #17

Updated by Oliver Hader about 2 years ago

  • Subtask deleted (#98361)
Actions #18

Updated by Oliver Hader about 2 years ago

  • Related to Bug #98361: PHP Warning: Undefined array key "_CURRENT_VERSION" in WorkspaceVersionRecordsCommand added
Actions #19

Updated by Daniel Siepmann about 2 years ago

  • Subtask deleted (#98337)
Actions #20

Updated by Daniel Siepmann about 2 years ago

  • Related to Bug #98337: Undefined array key "_CURRENT_VERSION" in WorkspaceVersionRecordsCommand added
Actions #21

Updated by Daniel Siepmann about 2 years ago

  • Subtask deleted (#98358)
Actions #22

Updated by Daniel Siepmann about 2 years ago

  • Related to Bug #98358: Undefined array key "exec" in ExtensionManagementUtility added
Actions #23

Updated by Daniel Siepmann about 2 years ago

  • Subtask deleted (#98359)
Actions #24

Updated by Daniel Siepmann about 2 years ago

  • Related to Bug #98359: PHP Warning: Undefined array key 0 in SchedulerCommand.php added
Actions #25

Updated by Daniel Siepmann about 2 years ago

  • Subtask deleted (#97619)
Actions #26

Updated by Daniel Siepmann about 2 years ago

  • Related to Bug #97619: Undefined array key "_CURRENT_VERSION" in CleanFlexFormsCommand added
Actions #27

Updated by Oliver Hader about 2 years ago

  • Description updated (diff)
Actions #28

Updated by Oliver Hader about 2 years ago

  • Description updated (diff)
Actions #29

Updated by Gerrit Code Review about 2 years ago

Patch set 4 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/75682

Actions #30

Updated by Gerrit Code Review about 2 years ago

Patch set 1 for branch 11.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/75777

Actions #31

Updated by Daniel Siepmann about 2 years ago

  • Related to Bug #98387: PHP Warning: Undefined array key "XYZ" in File line 184 added
Actions #32

Updated by Daniel Siepmann about 2 years ago

  • Related to Bug #98404: PHP Warning: Undefined array key "sys_language_uid" in PageRepository added
Actions #33

Updated by Daniel Siepmann about 2 years ago

  • Related to Bug #98406: PHP Warning: Undefined array key X in AbstractItemProvider added
Actions #34

Updated by Oliver Hader about 2 years ago

  • Related to Bug #98274: Undefined array key "skipIfValueIsEmpty" in SaveToDatabaseFinisher (PHP 8) added
Actions #35

Updated by Oliver Hader about 2 years ago

  • Subtask #98407 added
Actions #36

Updated by Oliver Hader about 2 years ago

  • Subtask #98408 added
Actions #37

Updated by Oliver Hader about 2 years ago

  • Subtask #98409 added
Actions #38

Updated by Oliver Hader about 2 years ago

  • Subtask #98410 added
Actions #39

Updated by Oliver Hader about 2 years ago

  • Subtask #98411 added
Actions #40

Updated by Daniel Siepmann about 2 years ago

  • Related to Bug #98412: PHP Warning: Undefined array key "xyz" in ProcessedFile added
Actions #41

Updated by Christian Kuhn about 2 years ago

  • Related to deleted (Bug #98404: PHP Warning: Undefined array key "sys_language_uid" in PageRepository)
Actions #42

Updated by Oliver Hader over 1 year ago

  • Status changed from Under Review to Rejected
Actions #43

Updated by Oliver Hader over 1 year ago

  • Status changed from Rejected to Closed

Giving up here...

Actions

Also available in: Atom PDF