diff --git a/core/modules/system/system.install b/core/modules/system/system.install index 7b8dc6202d..c7da69b45c 100644 --- a/core/modules/system/system.install +++ b/core/modules/system/system.install @@ -157,6 +157,7 @@ function system_requirements($phase) { } } + $phpversion = $phpversion_label = phpversion(); if (version_compare($phpversion, DRUPAL_MINIMUM_PHP) < 0) { $requirements['php']['description'] = t('Your PHP installation is too old. Drupal requires at least PHP %version.', ['%version' => DRUPAL_MINIMUM_PHP]); $requirements['php']['severity'] = REQUIREMENT_ERROR; @@ -169,7 +170,6 @@ function system_requirements($phase) { } // Test PHP version and show link to phpinfo() if it's available - $phpversion = $phpversion_label = phpversion(); if (function_exists('phpinfo')) { if ($phase === 'runtime') { $phpversion_label = t('@phpversion (more information)', ['@phpversion' => $phpversion, ':url' => (new Url('system.php'))->toString()]);