[TYPO3-core] RFC #12109: Call to getCache() on a non-object
Rupert Germann
rupi at gmx.li
Wed Oct 14 22:03:47 CEST 2009
Hi,
this is a SVN patch request.
Type: Bugfix
Bugtracker references:
http://bugs.typo3.org/view.php?id=12109
Branches: Trunk
Problem:
User writes: 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
this problem was introduced with the cache for t3lib_div::xml2array()
http://bugs.typo3.org/view.php?id=11260
which added calls to t3lib_pageselect::getHash and storeHash to
xml2array(). the caching framework is initalized after the extension
localconfs are loaded. And also class t3lib_pageSelect is not found
because the autoloader has not yet been initialzed.
Solution:
Check if there is a cachemanager object in storeHash/getHash and if not
do no caching. that will slow down things a bit compared to calling
t3lib_div::xml2array() with caching, but I don't see a problem here,
because that was the situation before 4.3.
Moving the caching framework initialisation before the extensions is no
option because this will kill DABL support. See bugnotes.
greets
rupert
More information about the TYPO3-team-core
mailing list