diff --git a/bundle/Templating/Twig/Extension/ImageRuntime.php b/bundle/Templating/Twig/Extension/ImageRuntime.php index 75a17aa1..2c49bd52 100644 --- a/bundle/Templating/Twig/Extension/ImageRuntime.php +++ b/bundle/Templating/Twig/Extension/ImageRuntime.php @@ -41,7 +41,7 @@ public function __construct( * * @return null|\eZ\Publish\SPI\Variation\Values\Variation */ - public function getImageVariation(Field $field, string $variationName): ?Variation + public function getImageVariation(Field $field, string $variationName): Variation { /** @var \eZ\Publish\Core\FieldType\Image\Value $value */ $value = $field->value; @@ -60,6 +60,6 @@ public function getImageVariation(Field $field, string $variationName): ?Variati ); } - return null; + return new Variation(); } }