Project

General

Profile

Actions

Bug #24406

closed

error when using t3lib_TCEmain->clear_cacheCmd in frontend

Added by Krystian Szymukowicz over 13 years ago. Updated over 12 years ago.

Status:
Closed
Priority:
Should have
Category:
Communication
Target version:
-
Start date:
2010-12-23
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

PROBLEM:

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

SOLUTION:

Check if we are in BE mode while writing the log.

if (TYPO3_MODE === 'BE') {
$this->BE_USER->writelog(....
}

(issue imported from #M16832)


Files

16832.patch (737 Bytes) 16832.patch Administrator Admin, 2010-12-25 18:58

Related issues 2 (0 open2 closed)

Related to TYPO3 Core - Bug #25114: [Patch] Fatal error in /t3lib/class.t3lib_tcemain.php on line 6774Closed2011-02-20

Actions
Related to TYPO3 Core - Bug #28007: TCEmain::clear_cacheCmd relies on active BE_USERClosed2011-07-08

Actions
Actions

Also available in: Atom PDF