Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / web / core / modules / options / src / Plugin / Field / FieldType / ListStringItem.php
index 1f8caeaf36174217f833bae5e9d36849e75db3f1..16e8878d7abf16cc57a8a7d45bc0aacf7bc24c46 100644 (file)
@@ -2,7 +2,6 @@
 
 namespace Drupal\options\Plugin\Field\FieldType;
 
-use Drupal\Component\Utility\Unicode;
 use Drupal\Core\Field\FieldStorageDefinitionInterface;
 use Drupal\Core\TypedData\DataDefinition;
 
@@ -65,7 +64,7 @@ class ListStringItem extends ListItemBase {
    * {@inheritdoc}
    */
   protected static function validateAllowedValue($option) {
-    if (Unicode::strlen($option) > 255) {
+    if (mb_strlen($option) > 255) {
       return t('Allowed values list: each key must be a string at most 255 characters long.');
     }
   }