Skip to content

Commit

Permalink
[TASK] content_defender tests v12
Browse files Browse the repository at this point in the history
  • Loading branch information
achimfritz committed Dec 19, 2024
1 parent 73d1412 commit d7ef60a
Showing 1 changed file with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,7 @@ abstract class AbstractContentDefender extends AbstractDatahandler
protected function setUp(): void
{
parent::setUp();
if ((GeneralUtility::makeInstance(Typo3Version::class))->getMajorVersion() === 12) {
// content_defender calls FormDataCompiler which wants access global variable TYPO3_REQUEST
$GLOBALS['TYPO3_REQUEST'] = null;
} elseif ((GeneralUtility::makeInstance(Typo3Version::class))->getMajorVersion() > 12) {
if ((GeneralUtility::makeInstance(Typo3Version::class))->getMajorVersion() > 12) {
// content_defender always returns true for restrictions if global variable TYPO3_REQUEST is null
$GLOBALS['TYPO3_REQUEST'] = (new ServerRequest())->withAttribute('applicationType', SystemEnvironmentBuilder::REQUESTTYPE_BE);
}
Expand Down

0 comments on commit d7ef60a

Please sign in to comment.