Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Commit

Permalink
[BUGFIX] Fix usage of $GLOBALS['TT'] (#14)
Browse files Browse the repository at this point in the history
Remove usage of $GLOBALS['TT'] and use GeneralUtility::makeInstance(TimeTracker::class) instead.
  • Loading branch information
NeoBlack authored and helhum committed Aug 30, 2016
1 parent 67848f1 commit 6300f98
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Classes/Hooks/UrlRewritingHook.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 29,9 @@
***************************************************************/

use TYPO3\CMS\Core\SingletonInterface;
use TYPO3\CMS\Core\TimeTracker\TimeTracker;
use TYPO3\CMS\Core\Utility\ArrayUtility;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController;

/**
Expand Down Expand Up @@ -213,14 215,14 @@ public function encodeSpURL(&$params) {
// Return directly, if simulateStaticDocuments is set
if ($GLOBALS['TSFE']->config['config']['simulateStaticDocuments']) {
/** @noinspection PhpUndefinedMethodInspection */
$GLOBALS['TT']->setTSlogMessage('SimulateStaticDocuments is enabled. RealURL disables itself.', 2);
GeneralUtility::makeInstance(TimeTracker::class)->setTSlogMessage('SimulateStaticDocuments is enabled. RealURL disables itself.', 2);
return;
}

// Return directly, if realurl is not enabled
if (!$GLOBALS['TSFE']->config['config']['tx_realurl_enable']) {
/** @noinspection PhpUndefinedMethodInspection */
$GLOBALS['TT']->setTSlogMessage('RealURL is not enabled in TS setup. Finished.');
GeneralUtility::makeInstance(TimeTracker::class)->setTSlogMessage('RealURL is not enabled in TS setup. Finished.');
return;
}
}
Expand Down

0 comments on commit 6300f98

Please sign in to comment.