Bug #25208
closed
Cannot complete Upgrade-Wizard with registered globals
Added by Michael Buergi over 13 years ago.
Updated almost 6 years ago.
Description
The upgrade of a typo3 installation from version 4.4 to version 4.5 fails with a php fatal error:
Fatal error: Call to a member function includeLLFile() on a non-object in /Websites/3rdparty/typo3/typo3/sysext/em/classes/install/class.tx_em_install.php on line 75
This happens in step 2 or 3 where the upgrade wizard tries to install extensions like 'Web > Info' and 'Web > Access'.
This problem only occurs when register_globals is enabled in the php configuration. Background: there is an environment variable "LANG" on my system that is being mapped to $GLOBALS['LANG'].
Since typo3 does not require register_globals to be off, it should cope with such a situation.
Kind regards
Michael
(issue imported from #M17807)
Files
Can you give me a hint, where this local variable $LANG appears?
I'm not sure what you mean. Nevertheless, I have uploaded my phpinfo output. The webserver runs on a virtualized ubuntu linux (hardy) from turnkey.
You can see the environment variable LANG on page 18 in the phpinfo file.
A clash with an environment variable? That's not possible to fix - $GLOBALS['LANG'] is used on many places and since ages.
I think, this issue was closed too soon.
I have had a look at the code and found the culprit:
instead of "if (!isset($GLOBALS['LANG']) ... " you should use "if (!is_object($GLOBALS['LANG']):
Index: typo3/sysext/install/Classes/Updates/Base.php
===================================================================
--- Base.php (revision 10669)
++ Base.php (working copy)
@ -197,7 +197,7
@
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');
}
thanks for having a second look at this
kind regards
Michael
Thanks, Patch is in gerrit, now.
- Target version deleted (
0)
I can't find the related review atm. but I assume this has been merged?
Patch set 2 of change I3eb45c77f21eae23ba2da99b3a461312c76475b2 has been pushed to the review server.
It is available at http://review.typo3.org/3404
Patch set 3 of change I3eb45c77f21eae23ba2da99b3a461312c76475b2 has been pushed to the review server.
It is available at http://review.typo3.org/3404
- Status changed from Needs Feedback to Resolved
- % Done changed from 0 to 100
- Status changed from Resolved to Closed
Also available in: Atom
PDF