[BUGFIX] PHP 5.4 E_STRICT warning in HtmlViewHelper
authorChristian Kuhn <lolli@schwarzbu.ch>
Sun, 17 Mar 2013 22:21:15 +0000 (23:21 +0100)
committerChristian Kuhn <lolli@schwarzbu.ch>
Sun, 17 Mar 2013 22:28:42 +0000 (23:28 +0100)
Creating the TSFE instance in HtmlViewHelper raises a PHP 5.4
warning 'Creating default Object from empty value'.

Change-Id: Ie269945e4257306cd9a80b2829795c6b1c3e0969
Releases: 6.1, 6.0, 4.7, 4.5
Resolves: #46393
Reviewed-on: https://review.typo3.org/18996
Reviewed-by: Alexander Schnitzler
Tested-by: Alexander Schnitzler
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
typo3/sysext/fluid/Classes/ViewHelpers/Format/HtmlViewHelper.php

index 6394f6c..2f8f415 100644 (file)
@@ -104,6 +104,7 @@ class HtmlViewHelper extends \TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper
        protected function simulateFrontendEnvironment() {
                $this->tsfeBackup = isset($GLOBALS['TSFE']) ? $GLOBALS['TSFE'] : NULL;
                $GLOBALS['TSFE'] = new \stdClass();
+               $GLOBALS['TSFE']->tmpl = new \stdClass();
                $GLOBALS['TSFE']->tmpl->setup = $this->configurationManager->getConfiguration(\TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface::CONFIGURATION_TYPE_FULL_TYPOSCRIPT);
        }