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

Tested-by: default avatarTYPO3com <>
Tested-by: Oliver Bartsch's avatarOliver Bartsch <>
Tested-by: Christian Kuhn's avatarChristian Kuhn <>
Reviewed-by: Oliver Bartsch's avatarOliver Bartsch <>
Reviewed-by: Christian Kuhn's avatarChristian Kuhn <>
parent 1c606e7c
......@@ -468,6 +468,13 @@ class FormFileExtensionUpdate implements ChattyInterface, UpgradeWizardInterface
$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)
$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