From 9e9b192b3c285322e945f0c2558dd5ef7dcf9490 Mon Sep 17 00:00:00 2001 From: Pierre Goiffon Date: Tue, 22 Sep 2020 15:35:13 +0200 Subject: [PATCH] =?UTF-8?q?N=C2=B02214=20Blocks=20execution=20for=20PHP=20?= =?UTF-8?q?<=207.0.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit As older PHP version can cause multiple problems, and we still use lots of requires that can generate PARSE_ERROR on such version, we chose to add this very low-level control. Therefore user will get a clear error message, and oldest PHP version will be blocked in the whole application. --- bootstrap.inc.php | 27 +++++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/bootstrap.inc.php b/bootstrap.inc.php index abbc1a877..f61a88ed1 100644 --- a/bootstrap.inc.php +++ b/bootstrap.inc.php @@ -1,7 +1,7 @@ = 7) { + $bIsValidPhpVersion = true; +} else { + echo 'Your PHP version ('.PHP_VERSION.') isn\'t supported.'; + exit(-1); +} + + define('ITOP_DEFAULT_ENV', 'production'); define('MAINTENANCE_MODE_FILE', APPROOT.'data/.maintenance'); define('READONLY_MODE_FILE', APPROOT.'data/.readonly'); -if (function_exists('microtime')) -{ +if (function_exists('microtime')) { $fItopStarted = microtime(true); -} -else -{ +} else { $fItopStarted = 1000 * time(); }