PHP max version check added

This commit is contained in:
Manish Verma
2021-02-18 17:09:53 +05:30
parent 3c1336be3f
commit ca895a67a2
2 changed files with 5 additions and 5 deletions

View File

@@ -55,8 +55,8 @@ class TestResult {
<?php
function validate_php(&$results) {
if (version_compare(PHP_VERSION, '7.1.3') == -1) {
$results[] = new TestResult('PHP version required in order to run Faveo HELPDESK is PHP 7.1.3 or greater. Your PHP version: ' . PHP_VERSION, STATUS_ERROR);
if (version_compare(PHP_VERSION, '7.1') == -1 || version_compare('7.1.50', PHP_VERSION) == -1) {
$results[] = new TestResult('PHP version required in order to run Faveo HELPDESK is PHP 7.1.* PHP version greater or lesser than 7.1 are not supported yet. Your PHP version: ' . PHP_VERSION, STATUS_ERROR);
return false;
} else {
$results[] = new TestResult('Your PHP version is ' . PHP_VERSION, STATUS_OK);