Skip to content

Commit

Permalink
[BUGFIX] Prevent value null for title and alt attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
muh-nr committed Aug 16, 2019
1 parent c57651e commit eaa4c90
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Classes/Controller/SelectImageController.php
Expand Up @@ -90,8 +90,8 @@ public function infoAction(ServerRequestInterface $request): ResponseInterface

return new JsonResponse([
'uid' => $file->getUid(),
'alt' => $file->getProperty('alternative'),
'title' => $file->getProperty('title'),
'alt' => empty($file->getProperty('alternative')) ? "" : $file->getProperty('alternative'),
'title' => empty($file->getProperty('title')) ? "" : $file->getProperty('title'),
'width' => $file->getProperty('width'),
'height' =>$file->getProperty('height'),
'url' => $this->prettifyImgUrl($processedFile->getPublicUrl()),
Expand Down

0 comments on commit eaa4c90

Please sign in to comment.