[BUGFIX] Initialize ModuleTemplate in VersionModuleController 08/44308/2
authorGeorg Ringer <georg.ringer@gmail.com>
Tue, 27 Oct 2015 05:53:54 +0000 (06:53 +0100)
committerAndreas Fernandez <typo3@scripting-base.de>
Tue, 27 Oct 2015 13:36:34 +0000 (14:36 +0100)
The ModuleTemplate must be initilized in the
VersionModuleController to avoid fatal errors.

Change-Id: I0d2c0087ff0f6e0e4f6a5cf57adf9a80485179bb
Resolves: #71059
Releases: master
Reviewed-on: https://review.typo3.org/44308
Reviewed-by: Xavier Perseguers <xavier@typo3.org>
Tested-by: Xavier Perseguers <xavier@typo3.org>
Reviewed-by: Andreas Fernandez <typo3@scripting-base.de>
Tested-by: Andreas Fernandez <typo3@scripting-base.de>
typo3/sysext/version/Classes/Controller/VersionModuleController.php

index 9fd4567..b5cb12d 100644 (file)
@@ -21,6 +21,7 @@ use TYPO3\CMS\Core\Utility\ArrayUtility;
 use TYPO3\CMS\Core\Utility\DiffUtility;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 use TYPO3\CMS\Backend\Utility\BackendUtility;
+use TYPO3\CMS\Backend\Template\ModuleTemplate;
 
 /**
  * Versioning module, including workspace management
@@ -114,12 +115,20 @@ class VersionModuleController extends \TYPO3\CMS\Backend\Module\BaseScriptClass
     protected $moduleName = 'web_txversionM1';
 
     /**
+     * ModuleTemplate object
+     *
+     * @var ModuleTemplate
+     */
+    protected $moduleTemplate;
+
+    /**
      * Initialize language files
      */
     public function __construct()
     {
         $GLOBALS['SOBE'] = $this;
         $GLOBALS['LANG']->includeLLFile('EXT:version/Resources/Private/Language/locallang.xlf');
+        $this->moduleTemplate = GeneralUtility::makeInstance(ModuleTemplate::class);
     }
 
     /**