[BUGFIX] Fix PHP Fatal Error in Upgrade wizard
authorMichael Buergi <michael.buergi@gmx.net>
Thu, 24 Mar 2011 10:29:44 +0000 (11:29 +0100)
committerSteffen Gebert <steffen.gebert@typo3.org>
Tue, 19 Jul 2011 19:04:56 +0000 (21:04 +0200)
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: I3eb45c77f21eae23ba2da99b3a461312c76475b2
Resolves: #25208
Reviewed-on: http://review.typo3.org/3404
Reviewed-by: Philipp Gampe
Tested-by: Philipp Gampe
Reviewed-by: Steffen Gebert
Tested-by: Steffen Gebert
typo3/sysext/install/Classes/Updates/Base.php

index b255d81..c422e5e 100644 (file)
@@ -197,7 +197,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');
                }