From 19a296dfa078d02fa57b7b1801cf34f6df9cd966 Mon Sep 17 00:00:00 2001 From: Jake Dallimore Date: Thu, 14 Apr 2022 10:13:06 +0800 Subject: [PATCH] MDL-74493 admin: add check for mbstring extension to prevent errors --- admin/index.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/admin/index.php b/admin/index.php index 3e91f680325..9732be58ddf 100644 --- a/admin/index.php +++ b/admin/index.php @@ -53,6 +53,12 @@ if (!extension_loaded('xml')) { die(); } +// Make sure mbstring extension is available. +if (!extension_loaded('mbstring')) { + echo 'Moodle requires the mbstring PHP extension. Please install or enable the mbstring extension.'; + die(); +} + define('NO_OUTPUT_BUFFERING', true); if (isset($_POST['upgradekey'])) { -- 2.11.4.GIT