Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / web / core / modules / migrate / src / Plugin / migrate / process / Substr.php
index 4d49a3809b70884c454c075cf24b210fdcc69cf8..b8f5f497b8b3ae6fa86b5b59079165eeb1d728a5 100644 (file)
@@ -6,14 +6,12 @@ use Drupal\migrate\ProcessPluginBase;
 use Drupal\migrate\MigrateExecutableInterface;
 use Drupal\migrate\Row;
 use Drupal\migrate\MigrateException;
-use Drupal\Component\Utility\Unicode;
 
 /**
  * Returns a substring of the input value.
  *
  * The substr process plugin returns the portion of the input value specified by
- * the start and length parameters. This is a wrapper around
- * \Drupal\Component\Utility\Unicode::substr().
+ * the start and length parameters. This is a wrapper around mb_substr().
  *
  * Available configuration keys:
  * - start: (optional) The returned string will start this many characters after
@@ -85,7 +83,7 @@ class Substr extends ProcessPluginBase {
     }
 
     // Use optional start or length to return a portion of $value.
-    $new_value = Unicode::substr($value, $start, $length);
+    $new_value = mb_substr($value, $start, $length);
     return $new_value;
   }