[BUGFIX] Do not write empty array values in form definitions 48/55848/11
authorRalf Zimmermann <ralf.zimmermann@tritum.de>
Tue, 20 Feb 2018 22:44:00 +0000 (23:44 +0100)
committerFrank Naegler <frank.naegler@typo3.org>
Thu, 19 Apr 2018 18:00:32 +0000 (20:00 +0200)
commit97582e4d2d27352232d02a75ba017133588ec543
treeb90a380c255e556fccd39d7b49260134f42be3b8
parent59f3177ee1becafe48c5d4b5138543ff76e449dd
[BUGFIX] Do not write empty array values in form definitions

Symfony YAML dumps empty arrays as sequence ("{  }"). Due to this, some
JavaScript modules of the form framework fail to interpret/ set the
correct data type for those properties.

If applied, this commit will ensure that the formEditor unsets empty
array keys on load/ save.

The problem only affects the backend module, not the frontend
formDefinition interpreter.

Resolves: #83985
Releases: master, 8.7
Change-Id: I913b8954790510b4ffcc80a47f9dbb7646239ff1
Reviewed-on: https://review.typo3.org/55848
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Björn Jacob <bjoern.jacob@tritum.de>
Tested-by: Björn Jacob <bjoern.jacob@tritum.de>
Reviewed-by: Kay Strobach <typo3@kay-strobach.de>
Tested-by: Kay Strobach <typo3@kay-strobach.de>
Reviewed-by: Frank Naegler <frank.naegler@typo3.org>
Tested-by: Frank Naegler <frank.naegler@typo3.org>
typo3/sysext/form/Classes/Controller/FormEditorController.php
typo3/sysext/form/Resources/Public/JavaScript/Backend/FormEditor/InspectorComponent.js
typo3/sysext/form/Tests/Unit/Controller/FormEditorControllerTest.php