Project

General

Profile

Actions

Bug #25208

closed

Cannot complete Upgrade-Wizard with registered globals

Added by Michael Buergi about 13 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Should have
Category:
-
Target version:
-
Start date:
2011-03-01
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
4.5
PHP Version:
5.2
Tags:
Complexity:
Is Regression:
Sprint Focus:

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

phpinfo.pdf (146 KB) phpinfo.pdf Administrator Admin, 2011-03-02 15:22
patch.diff (531 Bytes) patch.diff Administrator Admin, 2011-03-03 12:59
patch-git.diff (774 Bytes) patch-git.diff Administrator Admin, 2011-03-05 13:43
Actions #1

Updated by Steffen Gebert about 13 years ago

Can you give me a hint, where this local variable $LANG appears?

Actions #2

Updated by Michael Buergi about 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.

Actions #3

Updated by Steffen Gebert about 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.

Actions #4

Updated by Michael Buergi about 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

Actions #5

Updated by Michael Buergi about 13 years ago

any feedback on this?

Actions #6

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.

Actions #7

Updated by Michael Buergi about 13 years ago

Thanks, Patch is in gerrit, now.

Actions #8

Updated by Tolleiv Nietsch over 12 years ago

  • Target version deleted (0)

I can't find the related review atm. but I assume this has been merged?

Actions #9

Updated by Steffen Gebert over 12 years ago

Actions #10

Updated by Mr. Hudson over 12 years ago

Patch set 2 of change I3eb45c77f21eae23ba2da99b3a461312c76475b2 has been pushed to the review server.
It is available at http://review.typo3.org/3404

Actions #11

Updated by Mr. Hudson over 12 years ago

Patch set 3 of change I3eb45c77f21eae23ba2da99b3a461312c76475b2 has been pushed to the review server.
It is available at http://review.typo3.org/3404

Actions #12

Updated by Michael Buergi over 12 years ago

  • Status changed from Needs Feedback to Resolved
  • % Done changed from 0 to 100
Actions #13

Updated by Benni Mack over 5 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF