[BUGFIX] LocalizationStateSelector with new records
[Packages/TYPO3.CMS.git] / typo3 / sysext / backend / Classes / Form / FieldWizard / LocalizationStateSelector.php
index a7da8bd..0f3f525 100644 (file)
@@ -53,7 +53,7 @@ class LocalizationStateSelector extends AbstractNode
 
         $sourceLanguageTitle = '';
         $fieldValueInParentRow = '';
-        $fieldValueInSourceRow = '';
+        $fieldValueInSourceRow = null;
         if ($l10nParentFieldName && $this->data['databaseRow'][$l10nParentFieldName] > 0) {
             if ($l10nSourceFieldName && $this->data['databaseRow'][$l10nSourceFieldName] > 0) {
                 $languageField = $this->data['processedTca']['ctrl']['languageField'] ?? null;
@@ -75,7 +75,7 @@ class LocalizationStateSelector extends AbstractNode
         );
 
         $fieldElementName = 'data[' . htmlspecialchars($this->data['tableName']) . ']'
-            . '[' . (int)($this->data['databaseRow']['uid']) . ']'
+            . '[' . htmlspecialchars((string)$this->data['databaseRow']['uid']) . ']'
             . '[' . htmlspecialchars($l10nStateFieldName) . ']'
             . '[' . htmlspecialchars($this->data['fieldName']) . ']';
 
@@ -111,7 +111,7 @@ class LocalizationStateSelector extends AbstractNode
         $html[] =           $languageService->sL('LLL:EXT:lang/Resources/Private/Language/locallang_wizards.xlf:localizationStateSelector.defaultLanguageValue');
         $html[] =       '</label>';
         $html[] =   '</div>';
-        if ($fieldValueInSourceRow) {
+        if ($fieldValueInSourceRow !== null) {
             $html[] = '<div class="radio radio-inline">';
             $html[] =   '<label>';
             $html[] =       '<input';