From 56ae4a852573d2442d274e4940285a865384c094 Mon Sep 17 00:00:00 2001 From: kremsy Date: Wed, 21 Jun 2017 18:17:19 +0200 Subject: [PATCH] Resolved #150 added mbstring as depency (always preinstalled anyways) --- README.md | 5 +++-- core/Utils/SystemUtil.php | 10 ++++++++++ 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 8d054cf4..1ceadf44 100644 --- a/README.md +++ b/README.md @@ -34,13 +34,14 @@ https://www.maniacontrol.com ## REQUIREMENTS: - MySQL Database - PHP 5.4+ -- Needed extensions (on ManiaControl startup you will see if you have them activated): +- Needed extensions (on ManiaControl startup you will see if you have them installed and activated): - php_mysqli - php_curl - php_xmlrpc (TM only, recommended for SM) - php_zlib - php_zip - + - php_mbstring + ### How to report bugs or request features?: - Write a mail to bugs(at)maniacontrol(dot)com - Open an issue on GitHub.com/ManiaControl/ManiaControl diff --git a/core/Utils/SystemUtil.php b/core/Utils/SystemUtil.php index 94d61224..e6c43b68 100644 --- a/core/Utils/SystemUtil.php +++ b/core/Utils/SystemUtil.php @@ -97,6 +97,16 @@ class SystemUtil { Logger::log($message . 'FOUND!'); } + // Check for MBString + $message = 'Checking for installed mbstring ... '; + if (!extension_loaded('mbstring')) { + Logger::log($message . 'NOT FOUND!'); + Logger::log(" -- You don't have mbstring installed! Check: http://php.net/manual/en/mbstring.setup.php"); + $success = false; + } else { + Logger::log($message . 'FOUND!'); + } + if (!$success) { // Missing requirements self::quit();