added check for mbstring support

This commit is contained in:
Andy Miller 2015-09-10 12:49:38 -06:00
parent 2f38277993
commit 2ecebd14b0

View File

@ -19,6 +19,12 @@ $loader = require_once $autoload;
// Set timezone to default, falls back to system if php.ini not set
date_default_timezone_set(@date_default_timezone_get());
// Set internal encoding if mbstring loaded
if (!extension_loaded('mbstring')) {
throw new \RuntimeException("'mbstring' extension is not loaded. This is required for Grav to run correctly");
}
mb_internal_encoding('UTF-8');
// Get the Grav instance
$grav = Grav::instance(
array(