Bug #19568
closedFatal error on the function readLLXMLfile of the class t3lib_div
0%
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)
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...
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.
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.
Updated by Christian Kuhn over 14 years ago
Resolved, unable to reproduce in recent versions.