[TYPO3-core] RFC #12109: Call to getCache() on a non-object

Oliver Hader oliver at typo3.org
Wed Nov 25 20:21:53 CET 2009


Hi Rupi,

Rupert Germann schrieb:
> 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.

+1 by reading and testing

Please go ahead and commit to SVN Trunk! Thanks!

olly
-- 
Oliver Hader
TYPO3 Release Manager 4.3


More information about the TYPO3-team-core mailing list