diff --git a/Classes/ViewHelpers/ImageViewHelper.php b/Classes/ViewHelpers/ImageViewHelper.php index acc73b8..0c3fe0e 100644 --- a/Classes/ViewHelpers/ImageViewHelper.php +++ b/Classes/ViewHelpers/ImageViewHelper.php @@ -70,8 +70,9 @@ public function initializeArguments() */ public function render() { - if (($this->arguments['src'] === '' && is_null($this->arguments['image'])) - || $this->arguments['src'] !== '' && !is_null($this->arguments['image']) + $src = (string)$this->arguments['src']; + if (($src === '' && is_null($this->arguments['image'])) + || $src !== '' && !is_null($this->arguments['image']) ) { throw new \TYPO3Fluid\Fluid\Core\Exception( 'You must either specify a string src or a File object.', @@ -87,7 +88,7 @@ public function render() try { // Get FAL image object $image = $this->imageService->getImage( - $this->arguments['src'], + $src, $this->arguments['image'], $this->arguments['treatIdAsReference'] ); diff --git a/Classes/ViewHelpers/MediaViewHelper.php b/Classes/ViewHelpers/MediaViewHelper.php index 759fd5d..e3e82b2 100644 --- a/Classes/ViewHelpers/MediaViewHelper.php +++ b/Classes/ViewHelpers/MediaViewHelper.php @@ -70,7 +70,7 @@ public function initializeArguments() * @param string|null $fileExtension * @return string Rendered img tag */ - protected function renderImage(FileInterface $image, $width, $height, ?string $fileExtension) + protected function renderImage(FileInterface $image, $width, $height, ?string $fileExtension = null) { if ($this->arguments['breakpoints']) { return $this->renderPicture($image, $width, $height); diff --git a/ext_emconf.php b/ext_emconf.php index 308f537..c53ef88 100644 --- a/ext_emconf.php +++ b/ext_emconf.php @@ -9,7 +9,7 @@ 'state' => 'stable', 'uploadfolder' => false, 'clearCacheOnLoad' => false, - 'version' => '2.0.1', + 'version' => '2.0.2', 'constraints' => [ 'depends' => [ 'typo3' => '9.5.0-10.9.99',