[BUGFIX] Fix saving non public export presets 12/30112/2
authorMarc Bastian Heinrichs <typo3@mbh-software.de>
Wed, 14 May 2014 14:34:42 +0000 (16:34 +0200)
committerMarkus Klein <klein.t3@mfc-linz.at>
Thu, 22 May 2014 22:13:21 +0000 (00:13 +0200)
Fix sql error "Column 'public' cannot be null" on saving
with unchecked box public.

Resolves: #57405
Releases: 6.2
Change-Id: I1582728cc56781fdc12409956008fc82a6cd0d03
Reviewed-on: https://review.typo3.org/30112
Reviewed-by: Fabien Udriot
Tested-by: Fabien Udriot
Reviewed-by: Markus Klein
Tested-by: Markus Klein
typo3/sysext/impexp/Classes/Controller/ImportExportController.php

index 8ae8fd4..b43830d 100644 (file)
@@ -1134,6 +1134,8 @@ class ImportExportController extends \TYPO3\CMS\Backend\Module\BaseScriptClass {
                $msg = '';
                // Save preset
                $beUser = $this->getBackendUser();
+               // cast public checkbox to int, since this is a int field and NULL is not allowed
+               $inData['preset']['public'] = (int)$inData['preset']['public'];
                if (isset($presetData['save'])) {
                        $preset = $this->getPreset($presetData['select']);
                        // Update existing