* Small cleanup - check if controllerContext is set to prevent fatal error in rare...
authorSebastian Kurfürst <sebastian@typo3.org>
Mon, 5 Oct 2009 13:31:02 +0000 (13:31 +0000)
committerSebastian Kurfürst <sebastian@typo3.org>
Mon, 5 Oct 2009 13:31:02 +0000 (13:31 +0000)
typo3/sysext/fluid/Classes/View/TemplateView.php

index 00c3c25..f7c7246 100644 (file)
@@ -168,7 +168,9 @@ class Tx_Fluid_View_TemplateView extends Tx_Extbase_MVC_View_AbstractView implem
 
                $renderingContext = $this->objectFactory->create('Tx_Fluid_Core_Rendering_RenderingContext');
                $renderingContext->setTemplateVariableContainer($variableContainer);
-               $renderingContext->setControllerContext($this->controllerContext);
+               if ($this->controllerContext !== NULL) {
+                       $renderingContext->setControllerContext($this->controllerContext);
+               }
                $renderingContext->setRenderingConfiguration($renderingConfiguration);
 
                $viewHelperVariableContainer = $this->objectFactory->create('Tx_Fluid_Core_ViewHelper_ViewHelperVariableContainer');