Commit cf38735a authored by Oliver Bartsch's avatar Oliver Bartsch Committed by Benni Mack
Browse files

[BUGFIX] Prevent undefined array key warning in CleanFlexFormsCommand

Resolves: #97619
Releases: main, 11.5
Change-Id: Ib1812d04264cab9bf867891f8cc06d7dafeace99
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/74635

Tested-by: core-ci's avatarcore-ci <typo3@b13.com>
Tested-by: Stefan Bürk's avatarStefan Bürk <stefan@buerk.tech>
Tested-by: Benni Mack's avatarBenni Mack <benni@typo3.org>
Reviewed-by: Stefan Bürk's avatarStefan Bürk <stefan@buerk.tech>
Reviewed-by: Benni Mack's avatarBenni Mack <benni@typo3.org>
parent 9e937b46
...@@ -170,7 +170,7 @@ class CleanFlexFormsCommand extends Command ...@@ -170,7 +170,7 @@ class CleanFlexFormsCommand extends Command
); );
if (is_array($versions)) { if (is_array($versions)) {
foreach ($versions as $verRec) { foreach ($versions as $verRec) {
if (!$verRec['_CURRENT_VERSION']) { if (!($verRec['_CURRENT_VERSION'] ?? false)) {
// Traverse flexforms // Traverse flexforms
$dirtyFlexFormFields = $this->compareAllFlexFormsInRecord($tableName, $verRec['uid'], $dirtyFlexFormFields); $dirtyFlexFormFields = $this->compareAllFlexFormsInRecord($tableName, $verRec['uid'], $dirtyFlexFormFields);
} }
...@@ -207,7 +207,7 @@ class CleanFlexFormsCommand extends Command ...@@ -207,7 +207,7 @@ class CleanFlexFormsCommand extends Command
$versions = BackendUtility::selectVersionsOfRecord('pages', $pageId, 'uid,t3ver_oid,t3ver_wsid', null, true); $versions = BackendUtility::selectVersionsOfRecord('pages', $pageId, 'uid,t3ver_oid,t3ver_wsid', null, true);
if (is_array($versions)) { if (is_array($versions)) {
foreach ($versions as $verRec) { foreach ($versions as $verRec) {
if (!$verRec['_CURRENT_VERSION']) { if (!($verRec['_CURRENT_VERSION'] ?? false)) {
$dirtyFlexFormFields = $this->findAllDirtyFlexformsInPage($verRec['uid'], $depth, $dirtyFlexFormFields); $dirtyFlexFormFields = $this->findAllDirtyFlexformsInPage($verRec['uid'], $depth, $dirtyFlexFormFields);
} }
} }
......
Supports Markdown
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