[BUGFIX] Fatal error during install process
authorOliver Hader <oliver@typo3.org>
Sun, 18 Dec 2011 14:58:54 +0000 (15:58 +0100)
committerOliver Hader <oliver@typo3.org>
Sun, 18 Dec 2011 16:53:01 +0000 (17:53 +0100)
In the install tool there is no backend user available,
thus this needs to be checked before calling the writelog() method.

Change-Id: I16494e0ba01147a5111101e9a76cf44418c1c5fb
Fixes: #32666
Reviewed-on: http://review.typo3.org/7363
Reviewed-by: Oliver Hader
Tested-by: Oliver Hader
typo3/sysext/lang/hooks/clearcache/class.tx_lang_clearcache.php

index 32922ae..7de5bd8 100644 (file)
@@ -60,7 +60,9 @@ class tx_lang_clearcache {
         * @return void
         */
        public function clearCache() {
-               $GLOBALS['BE_USER']->writelog(3, 1, 0, 0, '[lang]: User %s has cleared the language cache', array($GLOBALS['BE_USER']->user['username']));
+               if (isset($GLOBALS['BE_USER'])) {
+                       $GLOBALS['BE_USER']->writelog(3, 1, 0, 0, '[lang]: User %s has cleared the language cache', array($GLOBALS['BE_USER']->user['username']));
+               }
                $this->cacheInstance->flush();
        }