From d89ae4d3698d3dbfb363e2bf2856b8fdb4f4c019 Mon Sep 17 00:00:00 2001 From: Jon Uhlmann Date: Sat, 15 Aug 2020 16:48:15 +0200 Subject: [PATCH] BUGFIX: Fix broken ResourceImageSource --- Classes/EelHelpers/ResourceImageSourceHelper.php | 7 +++++-- .../Private/Fusion/Prototypes/ResourceImageSource.fusion | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Classes/EelHelpers/ResourceImageSourceHelper.php b/Classes/EelHelpers/ResourceImageSourceHelper.php index 3c835fc..efaca3f 100644 --- a/Classes/EelHelpers/ResourceImageSourceHelper.php +++ b/Classes/EelHelpers/ResourceImageSourceHelper.php @@ -30,7 +30,7 @@ class ResourceImageSourceHelper extends AbstractImageSourceHelper * @param string $package * @param string $path */ - public function __construct(string $package, string $path) + public function __construct(?string $package, string $path) { $this->package = $package; $this->path = $path; @@ -38,6 +38,9 @@ public function __construct(string $package, string $path) public function src(): string { - return $this->resourceManager->getPublicPackageResourceUri($this->package, $this->path); + if ($this->package) { + return $this->resourceManager->getPublicPackageResourceUri($this->package, $this->path); + } + return $this->resourceManager->getPublicPackageResourceUriByPath($this->path); } } diff --git a/Resources/Private/Fusion/Prototypes/ResourceImageSource.fusion b/Resources/Private/Fusion/Prototypes/ResourceImageSource.fusion index ea87d32..a52d94d 100644 --- a/Resources/Private/Fusion/Prototypes/ResourceImageSource.fusion +++ b/Resources/Private/Fusion/Prototypes/ResourceImageSource.fusion @@ -1,5 +1,5 @@ prototype(Sitegeist.Kaleidoscope:ResourceImageSource) { @class = 'Sitegeist\\Kaleidoscope\\FusionObjects\\ResourceImageSourceImplementation' path = null - package = false + package = null }