Skip to content

Commit

Permalink
Merge pull request #70 from sitegeist/bugfix/strictTypesTypo39
Browse files Browse the repository at this point in the history
Bugfix/strict types typo39
  • Loading branch information
s2b authored Apr 13, 2020
2 parents 8cc3434 + e1c724d commit 1a559c1
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
7 changes: 4 additions & 3 deletions Classes/ViewHelpers/ImageViewHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.',
Expand All @@ -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']
);
Expand Down
2 changes: 1 addition & 1 deletion Classes/ViewHelpers/MediaViewHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion ext_emconf.php
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down

0 comments on commit 1a559c1

Please sign in to comment.