PMCORE-1881

This commit is contained in:
Julio Cesar Laura Avendaño
2021-02-01 15:48:58 +00:00
parent 25447d0669
commit 2dd80e2d75

View File

@@ -5058,15 +5058,13 @@ class WorkspaceTools
foreach ($fieldTypes as $key => $fieldType) { foreach ($fieldTypes as $key => $fieldType) {
foreach ($fieldType as $fieldTypeKey => $fieldTypeValue) { foreach ($fieldType as $fieldTypeKey => $fieldTypeValue) {
if (strtoupper($appDataKey) == $fieldTypeKey) { if (strtoupper($appDataKey) == $fieldTypeKey) {
$appData[$appDataKey] = validateType($appDataValue, $fieldTypeValue); $appDataValue = validateType($appDataValue, $fieldTypeValue);
unset($fieldTypeKey); unset($fieldTypeKey);
} }
} }
} }
// normal fields // normal fields
if (trim($appDataValue) === '') { $appData[$appDataKey] = $appDataValue === '' ? null : $appDataValue;
$appData[$appDataKey] = null;
}
} else { } else {
// grids // grids
if (is_array($appData[$appDataKey])) { if (is_array($appData[$appDataKey])) {