diff --git a/typo3/sysext/core/Build/UnitTestsBootstrap.php b/typo3/sysext/core/Build/UnitTestsBootstrap.php index 4ec5fe42c89c72f28dc9112ca80fb5727b0e146a..bfebaa8fcc47978271d99b9af58ee1ce173e6e33 100644 --- a/typo3/sysext/core/Build/UnitTestsBootstrap.php +++ b/typo3/sysext/core/Build/UnitTestsBootstrap.php @@ -134,6 +134,10 @@ class UnitTestsBootstrap define('TYPO3_cliMode', true); putenv('TYPO3_CONTEXT=Testing'); + // Set TYPO3_AJAX and define TYPO3_REQUESSTTYPE's to prevent PHP 7.2 warnings + $GLOBALS['TYPO3_AJAX'] = ''; + Bootstrap::getInstance()->defineTypo3RequestTypes(); + return $this; } diff --git a/typo3/sysext/core/Classes/Core/Bootstrap.php b/typo3/sysext/core/Classes/Core/Bootstrap.php index 145644fc864fc01c56de9343a9bd58e4cece687f..91b28c44feb742fcc6c2eff8a7a22a01be8bfeb9 100644 --- a/typo3/sysext/core/Classes/Core/Bootstrap.php +++ b/typo3/sysext/core/Classes/Core/Bootstrap.php @@ -738,7 +738,7 @@ class Bootstrap * * @return Bootstrap */ - protected function defineTypo3RequestTypes() + public function defineTypo3RequestTypes() { define('TYPO3_REQUESTTYPE_FE', 1); define('TYPO3_REQUESTTYPE_BE', 2);