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

Also available in: Atom PDF