diff --git a/core/lib/Drupal/Core/ImageToolkit/ImageToolkitOperationBase.php b/core/lib/Drupal/Core/ImageToolkit/ImageToolkitOperationBase.php index 5b2e913..dcda84e 100644 --- a/core/lib/Drupal/Core/ImageToolkit/ImageToolkitOperationBase.php +++ b/core/lib/Drupal/Core/ImageToolkit/ImageToolkitOperationBase.php @@ -43,7 +43,7 @@ public function prepare(ImageInterface $image, array &$arguments) { foreach ($this->getPluginDefinition()['arguments'] as $id => $argument) { // The defined argument hasn't been provided. if (!array_key_exists($id, $arguments)) { - if ($argument['required']) { + if (!empty($argument['required'])) { // If the argument is required throw an exception. throw new \InvalidArgumentException("Argument '$id' expected by plugin '" . $this->getPluginId() . "' but not passed."); }