Open 3l73 opened 3 months ago
The global variable TYPO3_REQUEST is accessed without checking the existence. After that the request ist used to retrieve the query parameters.
TYPO3_REQUEST
Within the CLI context this leads to the exception: Call to a member function getQueryParams() on null
See: Classes/DataHandler/ProcessCmdmap.php
development branch for TYPO3 12
-
The command map should not be executed.
The CLI command will leads to an exception.
Possible fix
Check if the server request is available or stop processing
$request = $GLOBALS['TYPO3_REQUEST'] ?? null; if (!($request instanceof ServerRequestInterface)) { return; } $queryParams = $request->getQueryParams();
Hi, I merged your pull request and will close the ticket afters test is successfull.
Summary / Description
The global variable
TYPO3_REQUEST
is accessed without checking the existence. After that the request ist used to retrieve the query parameters.Within the CLI context this leads to the exception: Call to a member function getQueryParams() on null
See: Classes/DataHandler/ProcessCmdmap.php
Version
development branch for TYPO3 12
Steps to reproduce
-
Expected behaviour
The command map should not be executed.
Actual behavior
The CLI command will leads to an exception.
Additional
Possible fix
Check if the server request is available or stop processing