]> git.agnieray.net Git - galette.git/commitdiff
Display required PHP version; closes #1682
authorJohan Cwiklinski <johan@x-tnd.be>
Sun, 11 Jun 2023 16:44:29 +0000 (18:44 +0200)
committerJohan Cwiklinski <johan@x-tnd.be>
Sun, 11 Jun 2023 16:44:29 +0000 (18:44 +0200)
galette/webroot/compat_test.php

index 55042d277a1ca15f387cc841728483bc99f6c783..fab2d8c9b5a6910067122bb10bba51fc36d2fcc1 100644 (file)
@@ -40,6 +40,10 @@ require_once GALETTE_ROOT . 'config/versions.inc.php';
 require_once GALETTE_ROOT . 'config/paths.inc.php';
 
 $phpok = !version_compare(PHP_VERSION, GALETTE_PHP_MIN, '<');
+$php_message = PHP_VERSION;
+if (!$phpok) {
+    $php_message .= sprintf(' (%s minimum required)', GALETTE_PHP_MIN);
+}
 $cm = new Galette\Core\CheckModules(false);
 $cm->doCheck(false); //do not load with translations!
 ?>
@@ -71,7 +75,7 @@ $cm->doCheck(false); //do not load with translations!
                 ?>
                             <ul class="leaders">
                                 <li>
-                                    <span>PHP <strong class="<?php echo ($phpok) ? 'Ok' : 'Missing'; ?>"><?php echo PHP_VERSION; ?></strong></span>
+                                    <span>PHP <strong class="<?php echo ($phpok) ? 'Ok' : 'Missing'; ?>"><?php echo $php_message; ?></strong></span>
                                     <span><i class="ui <?php echo ($phpok) ? 'green check' : 'red times'; ?> icon"></i></span>
                                 </li>
                 <?php