[BUGFIX] Add version check to /install/index.php
[Packages/TYPO3.CMS.git] / typo3 / install / index.php
1 <?php
2
3 // Exit early if php requirement is not satisfied.
4 if (version_compare(PHP_VERSION, '7.0.0', '<')) {
5 die('This version of TYPO3 CMS requires PHP 7.0 or above');
6 }
7
8 // This is a stub file for redirecting the user to the proper Install Tool URL
9
10 call_user_func(function () {
11
12 // We leverage the class loader here to get the static functionality of GeneralUtility and HttpUtility.
13 // This way we do not need to copy all the code here to cope with correct location header URL generation correctly
14 // as those two classes can already correctly deal with all known edge cases.
15
16 require __DIR__ . '/../../vendor/autoload.php';
17
18 // We ensure that possible notices from Core code do not kill our redirect due to PHP output
19 error_reporting(E_ALL & ~(E_STRICT | E_NOTICE | E_DEPRECATED));
20
21 \TYPO3\CMS\Core\Utility\HttpUtility::redirect('../sysext/install/Start/Install.php', \TYPO3\CMS\Core\Utility\HttpUtility::HTTP_STATUS_307);
22 });