#22317getTSConfigVal called with wrong object (Patch inside)
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)
Reviews 0
No change resolves or names this issue in its commit message, and no comment links one.