0012226: check for mbstring extension in bootstrap.php
authorPhilipp Schüle <p.schuele@metaways.de>
Fri, 23 Sep 2016 06:57:59 +0000 (08:57 +0200)
committerPhilipp Schüle <p.schuele@metaways.de>
Tue, 27 Sep 2016 12:46:04 +0000 (14:46 +0200)
adds extension_loaded check to bootstrap for mbstring

https://forge.tine20.org/view.php?id=12226

Change-Id: Ife7b1493837a46c59ce74c7cb73e1c69d2c70ab9
Reviewed-on: http://gerrit.tine20.com/customers/3608
Tested-by: Jenkins CI (http://ci.tine20.com/)
Reviewed-by: Philipp Schüle <p.schuele@metaways.de>
tine20/bootstrap.php

index 76aa852..3550c68 100644 (file)
@@ -30,7 +30,10 @@ if (PHP_VERSION_ID > 50600) {
         iconv_set_encoding('internal_encoding', "UTF-8");
     }
 }
-mb_internal_encoding("UTF-8");
+
+if (extension_loaded('mbstring')) {
+    mb_internal_encoding("UTF-8");
+}
 
 // intialize composers autoloader
 $autoloader = require __DIR__ . '/vendor/autoload.php';