From 3b35f5d23a8b6e990b00046ae0dca042f0f1c1f0 Mon Sep 17 00:00:00 2001 From: tinect Date: Mon, 16 May 2022 14:02:27 +0200 Subject: [PATCH] fix: update ThumbnailUrlTemplate to support newer versions Fixes #1 --- composer.json | 3 +-- src/Service/ThumbnailUrlTemplate.php | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/composer.json b/composer.json index 903a923..0959c86 100644 --- a/composer.json +++ b/composer.json @@ -21,8 +21,7 @@ } ], "require": { - "shopware/core": "*", - "frosh/platform-thumbnail-processor": "*" + "frosh/platform-thumbnail-processor": "^1.0.20" }, "extra": { "shopware-plugin-class": "Frosh\\ThumbnailProcessorImgProxy\\FroshPlatformThumbnailProcessorImgProxy", diff --git a/src/Service/ThumbnailUrlTemplate.php b/src/Service/ThumbnailUrlTemplate.php index 50ec6cd..928e460 100644 --- a/src/Service/ThumbnailUrlTemplate.php +++ b/src/Service/ThumbnailUrlTemplate.php @@ -51,7 +51,7 @@ public function __construct(SystemConfigService $systemConfigService, ThumbnailU * @param string $width * @param string $height */ - public function getUrl($mediaUrl, $mediaPath, $width, $height): string + public function getUrl($mediaUrl, $mediaPath, $width, $height = ''): string { $keyBin = pack('H*', $this->key); $saltBin = pack('H*', $this->salt);