MDL-73017 env: Moodle 3.9.x, 3.11.x and 4.0.x do not support PHP 8.1

This commit adds an additional environment check for the unsupported
PHP 8.1 version to Moodle 3.9.x, 3.11.x and 4.0.x.

It also updates the lang string for unsupported PHP version.

Signed-off-by: Daniel Ziegenberg <daniel@ziegenberg.at>
This commit is contained in:
Daniel Ziegenberg 2022-05-22 17:55:28 +02:00
parent 1d863c338a
commit afe68a65cb
No known key found for this signature in database
GPG key ID: 7E6F98FFADBEFD39
3 changed files with 20 additions and 6 deletions

View file

@ -1664,3 +1664,14 @@ function restrict_php_version_74(&$result) {
function restrict_php_version_80($result) {
return restrict_php_version($result, '8.0');
}
/**
* Check if the current PHP version is greater than or equal to
* PHP version 8.1
*
* @param object $result an environment_results instance
* @return bool result of version check
*/
function restrict_php_version_81($result) {
return restrict_php_version($result, '8.1');
}