Bug #22317
closedgetTSConfigVal called with wrong object (Patch inside)
0%
Description
How to fix it:
In t3lib/class.t3lib_tcemain.php->process_cmdmap() :
case 'swap':
-- $swapMode = $GLOBALS['BE_USER']->getTSConfigVal('options.workspaces.swapMode');
++ $swapMode = $this->BE_USER->getTSConfigVal('options.workspaces.swapMode');
How to reproduce it:
Do not log in as BE-User (so that GLOBALS['BE_USER'] is no set)!!!
Now call t3lib_TCEmain::start() with own BE-Userobject, e.g.:
$cmd[$this->tablename][$uid]['version'] = array(
'action' => 'swap',
'swapWith' => (int)$draftUid,
);
$tce->start(array(), $cmd, $mybeuser);
$tce->process_cmdmap();
Note: All other calls of BE-User objects in this methode are already $this->BE_USER.
(issue imported from #M13895)
Files
Updated by Chris topher over 14 years ago
Hi Andreas,
please send your patch to the core list!
Check out http://typo3.org/teams/core/core-mailinglist-rules/
Updated by Andreas Stauder over 14 years ago
Attached patch and sent to core list
Updated by Steffen Kamper over 14 years ago
Committed this no-brainer to trunk rev 7902 and 4_3 rev 7903