Skip to content
Snippets Groups Projects
Commit 5e8886d9 authored by Christian Kuhn's avatar Christian Kuhn Committed by Benjamin Franzke
Browse files

[BUGFIX] Avoid $GLOBALS['TYPO3_REQUEST'] warning in Clipboard

Functional test ext:felogin
ContentVisibleFieldsTest::loginFormContainsExpectedFields
indirectly calls $GLOBALS['TYPO3_REQUEST'] of
Clipboard::initializeClipboard().

Clipboard class does multiple things: It is a 'repository'
to find out which items are in the clipboard, and it helps
with rendering. The 'repository' part does not need $request.

Functional tests call initializeClipboard() without handing
over a request object and without preparing a request
as $GLOBALS['TYPO3_REQUEST']. While they could actively
init a request, they shouldn't need to do so.

The patch adds a fallback so clipboard class does not emit
a warning if neither $request is given nor $GLOBALS['TYPO3_REQUEST']
is set.

An according @todo is added to further streamline the code.

Change-Id: Ifde4e8fa053203acf8570cf969b073a7da176c42
Resolves: #95509
Releases: master
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/71477


Tested-by: default avatarStefan Bürk <stefan@buerk.tech>
Tested-by: default avatarcore-ci <typo3@b13.com>
Tested-by: default avatarBenjamin Franzke <bfr@qbus.de>
Reviewed-by: default avatarStefan Bürk <stefan@buerk.tech>
Reviewed-by: default avatarBenjamin Franzke <bfr@qbus.de>
parent f778cfe3
No related merge requests found
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment