[BUGFIX] Fix PHP warning in BackendUtility::lockRecords 92/18992/2
authorHelmut Hummel <helmut.hummel@typo3.org>
Sat, 16 Mar 2013 15:29:20 +0000 (16:29 +0100)
committerChristian Kuhn <lolli@schwarzbu.ch>
Sun, 17 Mar 2013 21:29:41 +0000 (22:29 +0100)
commitfa0b04c0311de0a81b06efee6a7463ef7ae34e57
treeca2f4d11772b1e431c933a678c6fd95e905bd68f
parente64683c8d5a5d1fc769284e9693be46b3de4efa6
[BUGFIX] Fix PHP warning in BackendUtility::lockRecords

This methods triggers a warning "Illegal String offset"
with PHP 5.4, because $GLOBALS['BE_USER']->user['uid'] is accessed
even if a user is not logged in.

Additionally a delete query is executed in this case which
does not make sense at all.

Properly check if a user is logged in before executing any
functionality in this method.

Fixes: #46361
Releases: 4.5, 4.7, 6.0, 6.1
Change-Id: I370e0a8610a55b3d684bef95d7c6905eaaaacbab
Reviewed-on: https://review.typo3.org/18992
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
typo3/sysext/backend/Classes/Utility/BackendUtility.php