X-Git-Url: http://aleph1.co.uk/gitweb/?a=blobdiff_plain;f=web%2Fcore%2Fmodules%2Fsystem%2Fsrc%2FPlugin%2FImageToolkit%2FGDToolkit.php;h=eafda1d5a3912e60f40c9c1863b8fc6019f6dc2e;hb=9424afc6c1f518c301bf87a23c047d1873435d05;hp=818c5b5cf0ef13d28026ecb01243729e8c829841;hpb=a2bd1bf0c2c1f1a17d188f4dc0726a45494cefae;p=yaffs-website diff --git a/web/core/modules/system/src/Plugin/ImageToolkit/GDToolkit.php b/web/core/modules/system/src/Plugin/ImageToolkit/GDToolkit.php index 818c5b5cf..eafda1d5a 100644 --- a/web/core/modules/system/src/Plugin/ImageToolkit/GDToolkit.php +++ b/web/core/modules/system/src/Plugin/ImageToolkit/GDToolkit.php @@ -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') {