Bug #28007
closedTCEmain::clear_cacheCmd relies on active BE_USER
100%
Description
Sympton:
An extension (like ve_guestbook) might clear the cache with this command:
$GLOBALS ['TSFE']->clearPageCacheContent_pidList ( $GLOBALS ['TSFE']->id );
Since clearing of the cache is now written to the system log, the following call in function clear_cacheCmd() class.t3lib_tcemain.php will fail if no BE_USER is logged in:
$this->BE_USER->writelog(3, 1, 0, 0, 'User %s has cleared the cache (cacheCmd=%s)', array($this->BE_USER->user['username'], $cacheCmd));
Solution: check whether a BE_USER object exists before making the call to the log (otherwise the log message would have no user name either)
if ($this->BE_USER) {
$this->BE_USER->writelog(3, 1, 0, 0, 'User %s has cleared the cache (cacheCmd=%s)', array($this->BE_USER->user['username'], $cacheCmd));
}