Skip to content
Snippets Groups Projects
Commit 5281b26c authored by Robert Kärner's avatar Robert Kärner Committed by Benni Mack
Browse files

[BUGFIX] Fix array access warnings in EditDocumentController

$this->firstEl is checked for !== null several times in
EditDocumentController, but it most certainly isn't, because
reset() returns false instead of null, if the array is empty.

This patch resolves this problem by setting $this->firstEl to
null, if reset($this->elementsData) returned false.

Resolves: #96342
Releases: main, 11.5
Change-Id: I45b7aff02d7b601e16fd05862542a9e3955de908
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/72638


Reviewed-by: default avatarStefan Bürk <stefan@buerk.tech>
Reviewed-by: default avatarphysikbuddha <r.kaerner@oranto.de>
Reviewed-by: default avatarOliver Klee <typo3-coding@oliverklee.de>
Reviewed-by: default avatarBenni Mack <benni@typo3.org>
Tested-by: default avatarphysikbuddha <r.kaerner@oranto.de>
Tested-by: default avatarcore-ci <typo3@b13.com>
Tested-by: default avatarBenni Mack <benni@typo3.org>
parent e34e3d97
Branches
Tags
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment