Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / web / core / lib / Drupal / Core / Asset / CssOptimizer.php
index 4ad7ba134ccaece993076f328c096c2987a512e9..94c2240abc1615db728dd69a4ff0c147ab214eae 100644 (file)
@@ -119,7 +119,7 @@ class CssOptimizer implements AssetOptimizerInterface {
       // If a BOM is found, convert the file to UTF-8, then use substr() to
       // remove the BOM from the result.
       if ($encoding = (Unicode::encodingFromBOM($contents))) {
-        $contents = Unicode::substr(Unicode::convertToUtf8($contents, $encoding), 1);
+        $contents = mb_substr(Unicode::convertToUtf8($contents, $encoding), 1);
       }
       // If no BOM, check for fallback encoding. Per CSS spec the regex is very strict.
       elseif (preg_match('/^@charset "([^"]+)";/', $contents, $matches)) {
@@ -189,7 +189,7 @@ class CssOptimizer implements AssetOptimizerInterface {
     if ($optimize) {
       // Perform some safe CSS optimizations.
       // Regexp to match comment blocks.
-      $comment     = '/\*[^*]*\*+(?:[^/*][^*]*\*+)*/';
+      $comment = '/\*[^*]*\*+(?:[^/*][^*]*\*+)*/';
       // Regexp to match double quoted strings.
       $double_quot = '"[^"\\\\]*(?:\\\\.[^"\\\\]*)*"';
       // Regexp to match single quoted strings.