Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / web / core / lib / Drupal / Core / Asset / JsOptimizer.php
index 6b8c217fcc57f69d0b3a2c137fb5fd2aeae5329f..243b40294c8621826303a9c73d13c766b8fcb0d8 100644 (file)
@@ -24,7 +24,7 @@ class JsOptimizer implements AssetOptimizerInterface {
     // remove the BOM from the result.
     $data = file_get_contents($js_asset['data']);
     if ($encoding = (Unicode::encodingFromBOM($data))) {
-      $data = Unicode::substr(Unicode::convertToUtf8($data, $encoding), 1);
+      $data = mb_substr(Unicode::convertToUtf8($data, $encoding), 1);
     }
     // If no BOM is found, check for the charset attribute.
     elseif (isset($js_asset['attributes']['charset'])) {