[BUGFIX] fix php fatal error of Upgrade wizard
authorMichael Buergi <michael.buergi@gmx.net>
Thu, 24 Mar 2011 10:29:44 +0000 (11:29 +0100)
committerJigal van Hemert <jigal@xs4all.nl>
Fri, 25 Mar 2011 22:02:06 +0000 (23:02 +0100)
The upgrade wizard of the install tool quits with a php fatal error if
php is configured to use registered globals.

When using registered globals, $GLOBALS['LANG'] may already be
initialized (with some string). The buggy line does not properly
initialize the language object if there is content in $GLOBALS['LANG'].
The solution changes this, so that $GLOBALS['LANG'] has to be an object
to prevent object creation. this line is also found in other places in
the typo3 source.

Change-Id: I1e553d233d6dac636d8a10a4ea5e60946e89d220
Resolves: #M17807
Reviewed-on: http://review.typo3.org/1254
Reviewed-by: Peter Niederlag
Reviewed-by: Philipp Gampe
Tested-by: Philipp Gampe
Reviewed-by: Xavier Perseguers
Reviewed-by: Jigal van Hemert
Tested-by: Jigal van Hemert

index 6dd8645..05dbfe1 100644 (file)
@@ -196,7 +196,7 @@ abstract class Tx_Install_Updates_Base {
        public function getExtensionManagerConnection() {
                        // Create an instance of language, if necessary.
                        // Needed in order to make the em_index work
-               if (!isset($GLOBALS['LANG'])) {
+               if (!is_object($GLOBALS['LANG'])) {
                        $GLOBALS['LANG'] = t3lib_div::makeInstance('language');
                        $GLOBALS['LANG']->csConvObj = t3lib_div::makeInstance('t3lib_cs');