[BUGFIX] Impossible to save the TCA configuration 81/17381/4
authorPhilipp Gampe <philipp.gampe@typo3.org>
Sat, 5 Jan 2013 22:59:39 +0000 (23:59 +0100)
committerChristian Kuhn <lolli@schwarzbu.ch>
Sat, 2 Feb 2013 09:26:42 +0000 (10:26 +0100)
The configuration module allows to save changes to the TCA array.

If no extTablesDefinitionScript is defined, constant
TYPO3_extTableDef_script is defined as empty. This results in an
attempt to write to a directory (because the filename is empty).
This is not obvious as the constant is not needed much and the
error message is misleading.

Solution is to fall back to the default value during bootstrap if
extTablesDefinitionScript is not set in LocalConfiguration.php.

Change-Id: Id759aa73146669cccae9a83d8452340f9f78927b
Fixes: #44331
Releases: 6.0, 6.1
Reviewed-on: https://review.typo3.org/17381
Reviewed-by: Anja Leichsenring
Tested-by: Anja Leichsenring
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
typo3/sysext/core/Classes/Core/Bootstrap.php

index 985c375..6fe9d89 100644 (file)
@@ -231,7 +231,10 @@ class Bootstrap {
                define('TYPO3_db_username', $GLOBALS['TYPO3_CONF_VARS']['DB']['username']);
                define('TYPO3_db_password', $GLOBALS['TYPO3_CONF_VARS']['DB']['password']);
                define('TYPO3_db_host', $GLOBALS['TYPO3_CONF_VARS']['DB']['host']);
-               define('TYPO3_extTableDef_script', $GLOBALS['TYPO3_CONF_VARS']['DB']['extTablesDefinitionScript']);
+               define('TYPO3_extTableDef_script',
+                       isset($GLOBALS['TYPO3_CONF_VARS']['DB']['extTablesDefinitionScript'])
+                       ? $GLOBALS['TYPO3_CONF_VARS']['DB']['extTablesDefinitionScript']
+                       : 'extTables.php');
                unset($GLOBALS['TYPO3_CONF_VARS']['DB']);
                define('TYPO3_user_agent', 'User-Agent: ' . $GLOBALS['TYPO3_CONF_VARS']['HTTP']['userAgent']);
                return $this;