[BUGFIX] PHP warning on saving TypoScript with t3editor 03/34203/2
authorOliver Hader <oliver@typo3.org>
Sat, 15 Nov 2014 12:52:50 +0000 (13:52 +0100)
committerOliver Hader <oliver.hader@typo3.org>
Sat, 15 Nov 2014 12:57:28 +0000 (13:57 +0100)
On saving TypoScript data in the accordant backend module
using t3editor, the AJAX call issues a PHP warning
"Creating default object from empty value". This only
happens if at least PHP 5.4 is used. The reason is,
that an uninitialized and empty variable is used for
object access.

Resolves: #62984
Releasses: 4.5
Change-Id: I7567d61f0a16379db58760dd963f0330dc8ca6c8
Reviewed-on: http://review.typo3.org/34203
Reviewed-by: Oliver Hader <oliver.hader@typo3.org>
Tested-by: Oliver Hader <oliver.hader@typo3.org>
typo3/sysext/t3editor/classes/class.tx_t3editor_hooks_tstemplateinfo.php

index 987c423..964dbb9 100644 (file)
@@ -172,7 +172,8 @@ class tx_t3editor_hooks_tstemplateinfo {
                                                // process template row before saving
                                                require_once t3lib_extMgm::extPath('tstemplate_info').'class.tx_tstemplateinfo.php';
                                                $tstemplateinfo = t3lib_div::makeInstance('tx_tstemplateinfo'); /* @var $tstemplateinfo tx_tstemplateinfo */
-                                                       // load the MOD_SETTINGS in order to check if the includeTypoScriptFileContent is set                                           
+                                                       // load the MOD_SETTINGS in order to check if the includeTypoScriptFileContent is set
+                                               $tstemplateinfo->pObj = $pObj;
                                                $tstemplateinfo->pObj->MOD_SETTINGS = t3lib_BEfunc::getModuleData(
                                                        array('includeTypoScriptFileContent' => true), 
                                                        array(),