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 <[email protected]>
This commit is contained in:
Daniel Ziegenberg
2022-12-05 11:39:53 +01:00
parent bdba78514f
commit 02663758fb
3 changed files with 20 additions and 6 deletions
+11
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');
}