[BUGFIX] Properly set default values in MigrationWizard for CType 'table' 35/48835/2
authorMorton Jonuschat <m.jonuschat@mojocode.de>
Wed, 6 Jul 2016 21:37:13 +0000 (23:37 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Thu, 7 Jul 2016 18:51:07 +0000 (20:51 +0200)
Cast the flexform value to string type before performing a type safe
comparison to avoid null values not being replaced by the default value
for the field.

Change-Id: Ibca3b2cf4a1e9b7871c549db980f8233d8b8a75b
Resolves: #76966
Releases: master
Reviewed-on: https://review.typo3.org/48835
Tested-by: Bamboo TYPO3com <info@typo3.com>
Reviewed-by: Michael Oehlhof <typo3@oehlhof.de>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
typo3/sysext/install/Classes/Updates/TableFlexFormToTtContentFieldsUpdate.php

index 4cf904e..808a037 100644 (file)
@@ -148,7 +148,7 @@ class TableFlexFormToTtContentFieldsUpdate extends AbstractUpdate
         foreach ($mapping as $fieldName => $configuration) {
             $flexFormValue = $this->getFlexFormValue($flexForm, $configuration['fieldName'], $configuration['sheet']);
 
-            if ($flexFormValue !== '') {
+            if ((string)$flexFormValue !== '') {
                 if ($configuration['values'] === 'passthrough') {
                     $fields[$fieldName] = $flexFormValue;
                 } elseif (is_array($configuration['values'])) {