Bug #25208
closedCannot complete Upgrade-Wizard with registered globals
100%
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
Updated by Steffen Gebert over 13 years ago
Can you give me a hint, where this local variable $LANG appears?
Updated by Michael Buergi over 13 years ago
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.
Updated by Steffen Gebert over 13 years ago
A clash with an environment variable? That's not possible to fix - $GLOBALS['LANG'] is used on many places and since ages.
Updated by Michael Buergi over 13 years ago
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
Updated by Steffen Gebert about 13 years ago
Okay, fine. I see no problem in using is_object().
Could you push a change request to Gerrit?
See http://wiki.typo3.org/Contribution_Walkthrough
On Friday is TYPO3 Bug Day, the "Git edition", if you need some help.
Updated by Tolleiv Nietsch almost 13 years ago
- Target version deleted (
0)
I can't find the related review atm. but I assume this has been merged?
Updated by Steffen Gebert almost 13 years ago
master:
http://review.typo3.org/1254 b2c9f3936c539b2b3fb035fb2e374cc1a7b22636
It's not in 4.5, yet. Will push now.
Updated by Mr. Hudson almost 13 years ago
Patch set 2 of change I3eb45c77f21eae23ba2da99b3a461312c76475b2 has been pushed to the review server.
It is available at http://review.typo3.org/3404
Updated by Mr. Hudson almost 13 years ago
Patch set 3 of change I3eb45c77f21eae23ba2da99b3a461312c76475b2 has been pushed to the review server.
It is available at http://review.typo3.org/3404
Updated by Michael Buergi almost 13 years ago
- Status changed from Needs Feedback to Resolved
- % Done changed from 0 to 100
Applied in changeset d59bcb108a67cdc74f765f5ec29f3d0c0a701227.