[TASK] Inject TSFE object into ContentObjectRenderer
[Packages/TYPO3.CMS.git] / typo3 / sysext / frontend / Classes / Controller / TypoScriptFrontendController.php
index 740ef25..e6ed34e 100644 (file)
@@ -3146,7 +3146,7 @@ class TypoScriptFrontendController implements LoggerAwareInterface
         $this->calculateLinkVars();
         // Instantiate \TYPO3\CMS\Frontend\ContentObject to generate the correct target URL
         /** @var $cObj ContentObjectRenderer */
-        $cObj = GeneralUtility::makeInstance(ContentObjectRenderer::class);
+        $cObj = GeneralUtility::makeInstance(ContentObjectRenderer::class, $this);
         $parameter = $this->page['uid'];
         $type = GeneralUtility::_GET('type');
         if ($type && MathUtility::canBeInterpretedAsInteger($type)) {
@@ -4082,7 +4082,7 @@ class TypoScriptFrontendController implements LoggerAwareInterface
      */
     public function newCObj()
     {
-        $this->cObj = GeneralUtility::makeInstance(ContentObjectRenderer::class);
+        $this->cObj = GeneralUtility::makeInstance(ContentObjectRenderer::class, $this);
         $this->cObj->start($this->page, 'pages');
     }