From f0c475b00f7c8def32d3547b3249dc0e9e452689 Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Sun, 17 Dec 2017 13:29:37 -0700 Subject: [PATCH] install/index.php - Read PHP version once This makes it a little easier to hack and simulate different PHP versions. --- install/index.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install/index.php b/install/index.php index e919317cb3..166bd2a8ef 100644 --- a/install/index.php +++ b/install/index.php @@ -868,9 +868,9 @@ class InstallRequirements { $aboveMinVersion = version_compare($phpVersion, CRM_Upgrade_Incremental_General::MIN_INSTALL_PHP_VER) >= 0; if ($aboveMinVersion) { - if (version_compare(phpversion(), CRM_Upgrade_Incremental_General::MIN_RECOMMENDED_PHP_VER) < 0) { + if (version_compare($phpVersion, CRM_Upgrade_Incremental_General::MIN_RECOMMENDED_PHP_VER) < 0) { $testDetails[2] = ts('This webserver is running an outdated version of PHP (%1). It is strongly recommended to upgrade to PHP %2 or later, as older versions can present a security risk. The preferred version is %3.', array( - 1 => phpversion(), + 1 => $phpVersion, 2 => CRM_Upgrade_Incremental_General::MIN_RECOMMENDED_PHP_VER, 3 => CRM_Upgrade_Incremental_General::RECOMMENDED_PHP_VER, )); -- 2.25.1