Updated to Drupal 8.6.4, which is PHP 7.3 friendly. Also updated HTMLaw library....
[yaffs-website] / web / core / modules / system / src / Plugin / ImageToolkit / GDToolkit.php
index 818c5b5cf0ef13d28026ecb01243729e8c829841..eafda1d5a3912e60f40c9c1863b8fc6019f6dc2e 100644 (file)
@@ -3,7 +3,6 @@
 namespace Drupal\system\Plugin\ImageToolkit;
 
 use Drupal\Component\Utility\Color;
-use Drupal\Component\Utility\Unicode;
 use Drupal\Core\Config\ConfigFactoryInterface;
 use Drupal\Core\Form\FormStateInterface;
 use Drupal\Core\ImageToolkit\ImageToolkitBase;
@@ -224,7 +223,7 @@ class GDToolkit extends ImageToolkitBase {
         $destination = drupal_tempnam('temporary://', 'gd_');
       }
       // Convert stream wrapper URI to normal path.
-      $destination = drupal_realpath($destination);
+      $destination = \Drupal::service('file_system')->realpath($destination);
     }
 
     $function = 'image' . image_type_to_extension($this->getType(), FALSE);
@@ -395,7 +394,7 @@ class GDToolkit extends ImageToolkitBase {
     foreach (static::supportedTypes() as $image_type) {
       // @todo Automatically fetch possible extensions for each mime type.
       // @see https://www.drupal.org/node/2311679
-      $extension = Unicode::strtolower(image_type_to_extension($image_type, FALSE));
+      $extension = mb_strtolower(image_type_to_extension($image_type, FALSE));
       $extensions[] = $extension;
       // Add some known similar extensions.
       if ($extension === 'jpeg') {