Project

General

Profile

Actions

Bug #19568

closed

Fatal error on the function readLLXMLfile of the class t3lib_div

Added by Antonio Alvarez about 16 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Should have
Category:
Communication
Target version:
-
Start date:
2008-11-04
Due date:
% Done:

0%

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

Description

The next fatal error happens in the function readLLXMLfile of the class t3lib_div, crashing all the website.

Fatal error: Cannot use string offset as an array in /var/www/typo3_src-4.1.3/t3lib/class.t3lib_div.php on line 4199

It seems a bug in PHP5: http://bugs.php.net/bug.php?id=32621

The solution is modify the line 4199:

$LOCAL_LANG[$langKey] = is_array($local_xmlContent['data'][$langKey]) ? $local_xmlContent['data'][$langKey] : array();

...and put this:

$LOCAL_LANG[$langKey] = (is_array($local_xmlContent['data']) && is_array($local_xmlContent['data'][$langKey])) ? $local_xmlContent['data'][$langKey] : array();

(issue imported from #M9732)

Actions #1

Updated by Oliver Hader about 16 years ago

Hi, you're reporting a bug for TYPO3 4.2.2. But the error message clearly states that you're using a TYPO3 4.1.3 installation...

Actions #2

Updated by Antonio Alvarez about 16 years ago

Sorry, the error happened in TYPO3 4.1.3, but I check the if the file class.t3lib_div.php had the same problematic line in TYPO3 4.2.2, so I put that.

Actions #3

Updated by Rupert Germann over 15 years ago

I could not reproduce the error with PHP 5.2.4 (ubuntu) and latest trunk.
Even if I force $local_xmlContent to be an empty array no error occurs.

Actions #4

Updated by Christian Kuhn over 14 years ago

Resolved, unable to reproduce in recent versions.

Actions #5

Updated by Benni Mack about 6 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF