[TYPO3-dev] using TCEMAIN clear_cacheCmd in frontend in 4.5 trunk

Krystian Szymukowicz t33k at prolabium.com
Thu Dec 23 17:11:07 CET 2010


W dniu 2010-12-23 17:07, Krystian Szymukowicz pisze:
>
>
> hi
>
> in rev. 8481 there has been added writelog when clearing the cache.
>
> public function clear_cacheCmd($cacheCmd) {
>
> $this->BE_USER->writelog(..........
>
>
>
> But some extesions like Dmitry Dulepov 'comments' are using
> 'clear_cacheCmd' from frontend where $this->BE_USER is not initialised.
>
> So we get:
> Fatal error: Call to a member function writelog() on a non-object in
> T:\workspace-typo3\typo3\typo3_src-svn-trunk\t3lib\class.t3lib_tcemain.php
> on line 6761
>
>
> What is the solution for that? Is TCEMAIN only supposed to be used from
> BE ?
>
>
> Is a condition like
>
> if(TYPO3_MODE == 'BE') {
> $this->BE_USER->writelog(....
> }
>

or maybe better

if(is_object($this->BE_USER)) {
$this->BE_USER->writelog(....
}


-- 
grtz
Krystian Szymukowicz




More information about the TYPO3-dev mailing list