From: Coleman Watts Date: Mon, 17 Oct 2016 22:29:49 +0000 (-0400) Subject: Check for required mbstring extension X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=28288426d6db95be9cb065ade606fc7accfa6af3;p=civicrm-core.git Check for required mbstring extension --- diff --git a/CRM/Utils/Check/Component/Env.php b/CRM/Utils/Check/Component/Env.php index 2a370562eb..f2b9bc9773 100644 --- a/CRM/Utils/Check/Component/Env.php +++ b/CRM/Utils/Check/Component/Env.php @@ -698,4 +698,23 @@ class CRM_Utils_Check_Component_Env extends CRM_Utils_Check_Component { return $messages; } + /** + * Check for required mbstring extension + * @return array + */ + public function checkMbstring() { + $messages = array(); + + if (!function_exists('mb_substr')) { + $messages[] = new CRM_Utils_Check_Message( + __FUNCTION__, + ts('The required PHP Multibyte String extension is not enabled on your server. Ask your system administrator to install it.'), + ts('Missing mbstring Extension'), + \Psr\Log\LogLevel::ERROR, + 'fa-server' + ); + } + return $messages; + } + }