[BUGFIX] Accept alternative notations for setDBinit 34/19034/3
authorMichael Stucki <michael.stucki@typo3.org>
Tue, 19 Mar 2013 10:19:10 +0000 (11:19 +0100)
committerJigal van Hemert <jigal@xs4all.nl>
Mon, 1 Apr 2013 11:05:45 +0000 (13:05 +0200)
Allow quotes and upper-case notation when checking if
$TYPO3_CONF_VARS['SYS']['setDBinit'] is configured properly.

Resolves: #24582
Releases: 6.1, 6.0
Change-Id: I51a5f6cf363077c738656c207648f21d726de72b
Reviewed-on: https://review.typo3.org/19034
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
Reviewed-by: Jigal van Hemert
Tested-by: Jigal van Hemert
typo3/sysext/core/Classes/Core/Bootstrap.php

index 3d86064..76c9c07 100644 (file)
@@ -328,7 +328,7 @@ class Bootstrap {
 
                if (isset($GLOBALS['TYPO3_CONF_VARS']['SYS']['setDBinit']) &&
                        $GLOBALS['TYPO3_CONF_VARS']['SYS']['setDBinit'] !== '-1' &&
-                       preg_match('/SET NAMES utf8/', $GLOBALS['TYPO3_CONF_VARS']['SYS']['setDBinit']) === FALSE &&
+                       preg_match('/SET NAMES [\'"]?utf8[\'"]?/i', $GLOBALS['TYPO3_CONF_VARS']['SYS']['setDBinit']) === FALSE &&
                        TYPO3_enterInstallScript !== '1') {
 
                        // Only accept "SET NAMES utf8" for this setting, otherwise die with a nice error