diff --git a/bootstrap.inc.php b/bootstrap.inc.php index b9bfd5835..3f3344e5e 100644 --- a/bootstrap.inc.php +++ b/bootstrap.inc.php @@ -25,6 +25,10 @@ * This is a hard-coded check that limits errors : we are stopping for anything < PHP 7.0.0 * The "real one" will be done in {@link \SetupUtils::CheckPhpVersion()} * + * Note that since Composer 2 there is a platform_check that make this useless, but keeping it anyway to be extra safe ! + * + * @see https://github.com/composer/composer/blob/master/doc/07-runtime.md#platform-check Composer's platform check + * * @since 3.0.0 N°2214 */ $bIsValidPhpVersion = false; diff --git a/setup/index.php b/setup/index.php index 501f4ceed..d107dca3f 100644 --- a/setup/index.php +++ b/setup/index.php @@ -19,68 +19,25 @@ /** - * Simple redirection page - * Will display an error message if a parse error occurs ! + * Simple redirection page to check PHP requirements + * + * @see https://github.com/composer/composer/blob/master/doc/07-runtime.md#platform-check Composer's platform_check * * @since 3.0.0 N°3253 */ +require_once('../lib/autoload.php'); -echo <<<'HTML' +echo << -iTop Setup - redirection - - - - - - +iTop setup - redirection page -HTML; - - -function HandlePageErrors() -{ - $error = error_get_last(); - if ($error - && (isset($error['type'])) - && (in_array($error['type'], [E_ERROR, E_PARSE, E_COMPILE_ERROR], true))) { - ob_end_clean(); - } -} - -function CleanOutput($sBuffer) -{ - return ''; -} - - -register_shutdown_function('HandlePageErrors'); -ob_start('CleanOutput'); -require_once("wizard.php"); -ob_end_clean(); - -echo << -bSkipErrorDisplay = true; document.location = "wizard.php"; - + + HTML;