[BUGFIX] Fix PHP warning in BackendUtility::lockRecords 94/18994/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:30:01 +0000 (22:30 +0100)
commite7dec0bd90dce900c837ef980f65e54f4bac8fa1
treea6865b7ab49345528361f571444812a056bada2f
parentd67654420237bcbd7380d8eaaae4326f275cd258
[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/18994
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
t3lib/class.t3lib_befunc.php