diff --git a/core/modules/system/src/Plugin/ImageToolkit/Operation/gd/CreateNew.php b/core/modules/system/src/Plugin/ImageToolkit/Operation/gd/CreateNew.php index 49e94f2..0c69841 100644 --- a/core/modules/system/src/Plugin/ImageToolkit/Operation/gd/CreateNew.php +++ b/core/modules/system/src/Plugin/ImageToolkit/Operation/gd/CreateNew.php @@ -7,9 +7,6 @@ namespace Drupal\system\Plugin\ImageToolkit\Operation\gd; -use Drupal\Component\Utility\Color; -use Drupal\Component\Utility\SafeMarkup; - /** * Defines GD2 create_new image operation. * diff --git a/core/modules/system/src/Plugin/ImageToolkit/Operation/gd/CreateTemp.php b/core/modules/system/src/Plugin/ImageToolkit/Operation/gd/CreateTemp.php index a87d47f..5d36e32 100644 --- a/core/modules/system/src/Plugin/ImageToolkit/Operation/gd/CreateTemp.php +++ b/core/modules/system/src/Plugin/ImageToolkit/Operation/gd/CreateTemp.php @@ -53,7 +53,7 @@ protected function arguments() { protected function validateArguments(array $arguments) { // Assure extension is supported. if (!in_array($arguments['extension'], $this->getToolkit()->getSupportedExtensions())) { - throw new \InvalidArgumentException(SafeMarkup::format("Invalid extension (@value) specified for the image 'convert' operation", array('@value' => $arguments['extension']))); + throw new \InvalidArgumentException(SafeMarkup::format("Invalid extension (@value) specified for the image 'create_temp' operation", array('@value' => $arguments['extension']))); } // Assure integers for width and height. @@ -62,15 +62,15 @@ protected function validateArguments(array $arguments) { // Fail when width or height are 0 or negative. if ($arguments['width'] <= 0) { - throw new \InvalidArgumentException(SafeMarkup::format("Invalid width (@value) specified for the image 'create_new' operation", array('@value' => $arguments['width']))); + throw new \InvalidArgumentException(SafeMarkup::format("Invalid width (@value) specified for the image 'create_temp' operation", array('@value' => $arguments['width']))); } if ($arguments['height'] <= 0) { - throw new \InvalidArgumentException(SafeMarkup::format("Invalid height (@value) specified for the image 'create_new' operation", array('@value' => $arguments['height']))); + throw new \InvalidArgumentException(SafeMarkup::format("Invalid height (@value) specified for the image 'create_temp' operation", array('@value' => $arguments['height']))); } // Assure transparent color is a valid hex string. if ($arguments['transparent_color'] && !Color::validateHex($arguments['transparent_color'])) { - throw new \InvalidArgumentException(SafeMarkup::format("Invalid transparent color (@value) specified for the image 'create_new' operation", array('@value' => $arguments['transparent_color']))); + throw new \InvalidArgumentException(SafeMarkup::format("Invalid transparent color (@value) specified for the image 'create_temp' operation", array('@value' => $arguments['transparent_color']))); } return $arguments;