Issue Bug Closed

#21181Call to getCache() on a non-object

Franz Holzinger 10/03/09, 20:55 updated 08/06/10, 13:31

Description

In some cases, if you call t3lib_div::xml2array out from localconf.php of an extension, then the caching has not been initialized.

Fatal error: Call to a member function getCache() on a non-object in …../typo3_src-4.3.0beta1/t3lib/class.t3lib_page.php on line 978

$contentHashCache = $GLOBALS[‘typo3CacheManager’]->getCache(‘cache_hash’);

Solution:
It should be checked if the object $GLOBALS[‘typo3CacheManager’] exists, and if not, the else branch should be called.

(issue imported from #M12109)

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.