Commit 94b89adf authored by Ayke Halder's avatar Ayke Halder Committed by Christian Kuhn
Browse files

[BUGFIX] Skip broken flexform in form upgrade wizard

The form upgrade wizard skips a form content element if it has broken
flexform data.

Reasons for broken flexform data:
* There is no data other than a base XML-structure
* The data is invalid XML

Resolves: #93146
Releases: master, 10.4
Change-Id: I1c2d9f9bf0a6e32a6d4051084c71306465e470c9
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/67233

Tested-by: default avatarTYPO3com <noreply@typo3.com>
Tested-by: Oliver Bartsch's avatarOliver Bartsch <bo@cedev.de>
Tested-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Oliver Bartsch's avatarOliver Bartsch <bo@cedev.de>
Reviewed-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
parent 1c606e7c
......@@ -468,6 +468,13 @@ class FormFileExtensionUpdate implements ChattyInterface, UpgradeWizardInterface
continue;
}
$flexform = GeneralUtility::xml2array($pluginData['pi_flexform']);
if (!is_array($flexform)) {
// * There is no data other than a base XML-structure in pi_flexform:
// xml2array returns empty string or newline-character (string)
// * pi_flexform is invalid XML:
// xml2array returns an error message (string)
continue;
}
$referencedPersistenceIdentifier = $this->getPersistenceIdentifierFromFlexform($flexform);
$referenceHasNewFileExtension = $this->hasNewFileExtension($referencedPersistenceIdentifier);
$possibleOldReferencedPersistenceIdentifier = $this->getOldPersistenceIdentifier($referencedPersistenceIdentifier);
......
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