69819[BUGFIX] Fix undefined array key warnings for frontend in PHP8
Commit message
Review
-
Code review CR +2 Done
- Benni Mack +2
- Oli Bartsch +1
-
Verified V +2 Done
- Benni Mack +2
- Oli Bartsch +1
- core-ci +1 CI
Issues 1
Files 19
- typo3/sysext/core/Classes/DataHandling/DataHandler.php+2 −2
- typo3/sysext/core/Classes/Domain/Repository/PageRepository.php+5 −5
- typo3/sysext/core/Classes/Resource/File.php+1 −1
- typo3/sysext/core/Classes/TypoScript/Parser/TypoScriptParser.php+1 −1
- typo3/sysext/form/Classes/Domain/Factory/ArrayFormFactory.php2+1 −1
- typo3/sysext/frontend/Classes/ContentObject/Menu/AbstractMenuContentObject.php6+64 −68
- typo3/sysext/frontend/Classes/ContentObject/Menu/TextMenuContentObject.php4+7 −7
- typo3/sysext/frontend/Classes/ContentObject/ContentContentObject.php+3 −3
- typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php+6 −6
- typo3/sysext/frontend/Classes/ContentObject/RecordsContentObject.php2+9 −5
- typo3/sysext/frontend/Classes/DataProcessing/MenuProcessor.php+4 −4
- typo3/sysext/frontend/Classes/Http/RequestHandler.php+2 −2
- typo3/sysext/frontend/Classes/Typolink/PageLinkBuilder.php+1 −1
- typo3/sysext/indexed_search/Classes/Controller/SearchController.php2+17 −16
- typo3/sysext/indexed_search/Classes/Domain/Repository/IndexSearchRepository.php4+4 −4
- typo3/sysext/indexed_search/Classes/Hook/TypoScriptFrontendHook.php+1 −1
- typo3/sysext/indexed_search/Classes/Indexer.php6+17 −9
- typo3/sysext/indexed_search/Classes/Lexer.php9+6 −6
- typo3/sysext/rte_ckeditor/Classes/Form/Element/RichTextElement.php+1 −1
Review log 2032
Show 47 earlier messages
-
Jochen Roth uploaded patch set 1 07/12/21, 22:36
-
core-ci voted on patch set 1 V +1 07/12/21, 22:47 Core CI is happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/13266
-
Jochen Roth uploaded patch set 2 07/13/21, 08:29
-
core-ci voted on patch set 2 V +1 07/13/21, 08:43 Core CI is happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/13273
-
Jochen Roth uploaded patch set 3 07/13/21, 16:09
-
core-ci voted on patch set 3 V -1 07/13/21, 16:22 Core CI is not happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/13299
-
Jochen Roth uploaded patch set 4 07/13/21, 16:40
-
core-ci voted on patch set 4 V -1 07/13/21, 16:52 Core CI is not happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/13302
-
Jochen Roth uploaded patch set 5 07/13/21, 19:48
-
core-ci voted on patch set 5 V +1 07/13/21, 20:00 Core CI is happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/13303
-
Jochen Roth uploaded patch set 6 07/13/21, 21:28
-
core-ci voted on patch set 6 V +1 07/13/21, 21:41 Core CI is happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/13304
-
Jochen Roth uploaded patch set 7 07/13/21, 21:56
-
core-ci voted on patch set 7 V -1 07/13/21, 22:19 Core CI is not happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/13306
-
Jochen Roth uploaded patch set 8 07/14/21, 12:35
-
core-ci voted on patch set 8 V +1 07/14/21, 12:51 Core CI is happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/13317
-
Jochen Roth uploaded patch set 9 07/14/21, 15:43
-
core-ci voted on patch set 9 V +1 07/14/21, 15:58 Core CI is happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/13322
-
Oli Bartsch commented on patch set 9 07/14/21, 16:11
ArrayFormFactory.php:57This should just be `$configuration['invalid'] ?? false`AbstractMenuContentObject.php:759$val['id'] is always set?AbstractMenuContentObject.php:1177Is this always set?AbstractMenuContentObject.php:1313Is this always set?TextMenuContentObject.php:76Looking at the usages shouldn't this be a string?RecordsContentObject.php:115Maybe we should also check this one in the if, otherwise we had to check this on every access.SearchController.php:951Not a fan of using `$lexer` here as its purpose is different, see line 954. Let's do it like in Indexer.phpIndexSearchRepository.php:201This is a bool according to its annotation.Indexer.php:1097This is really hard to grasp. I would prefer not using short handed here.Indexer.php:1128Same as aboveIndexer.php:1798Only this one needs to be "secured"?Lexer.php:165When changing to strict types, I suggest to use a type cast for ($str[$pos] ?? '')Lexer.php:191Same as aboveLexer.php:228Same as above -
Jochen Roth uploaded patch set 10 07/14/21, 19:34
-
core-ci voted on patch set 10 V +1 07/14/21, 19:51 Core CI is happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/13336
-
Jochen Roth commented on patch set 10 07/15/21, 07:25
ExtendedTemplateService.php:835ReplyReverted the changes ExtendedTemplateService.phpArrayFormFactory.php:57ReplyDoneAbstractMenuContentObject.php:759ReplyYes :-)AbstractMenuContentObject.php:1177ReplySet fallback here as well. Just in case.AbstractMenuContentObject.php:1313ReplyYes.TextMenuContentObject.php:76ReplyWell, yes and no. $this->subMenu() expects int as first param while str_replace() expects string. Now casting $this->subMenu() to int.RecordsContentObject.php:115ReplyDoneSearchController.php:951ReplyDoneIndexSearchRepository.php:201ReplyAckIndexer.php:1097ReplyAckIndexer.php:1128ReplyAckIndexer.php:1798Reply"secured" the other 2 as well -
Oli Bartsch commented on patch set 10 07/15/21, 21:28
TextMenuContentObject.php:76ReplyYou're right. In that case I would suggest making it an int. Since you have to cast in one time anyway, uid<=>int makes more sense as fallback IMO. Sorry for the inconvenience.IndexSearchRepository.php:201ReplyNow it falls back to int, but it's still a bool. :)Lexer.php:165ReplyDoneLexer.php:191ReplyStill missing the string castLexer.php:228Replystill missing the string cast -
Jochen Roth uploaded patch set 11 07/16/21, 08:44
-
core-ci voted on patch set 11 V -1 07/16/21, 08:56 Core CI is not happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/13377
-
Oli Bartsch rebased onto patch set 12 07/16/21, 12:37
-
core-ci voted on patch set 12 V +1 07/16/21, 12:50 Core CI is happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/13389
-
Jochen Roth commented on patch set 12 07/16/21, 12:53
TextMenuContentObject.php:76ReplyDoneIndexSearchRepository.php:201ReplySorry, changed it.Lexer.php:191ReplyDoneLexer.php:228ReplyDone -
Oli Bartsch voted on patch set 12 V +1 CR +1 07/16/21, 12:54
-
Benni Mack voted on patch set 12 V +2 CR +2 07/16/21, 15:26
-
Benni Mack merged patch set 13 07/16/21, 15:26
-
Benni Mack commented on patch set 13 10/14/21, 06:38
Lexer.php:238$cType was not set anymore in this case. Fixed here https://review.typo3.org/c/Packages/TYPO3.CMS/+/71652
ExtendedTemplateService.php:835