Skip to content

Commit

Permalink
fix: check for empty file in FileReferenceTransformer
Browse files Browse the repository at this point in the history
  • Loading branch information
twojtylak committed Jan 31, 2024
1 parent 8c41401 commit 59ecab6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Classes/Domain/Transformer/FileReferenceTransformer.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public function transform(array $fileReference): array
'link' => $fileReference['link'],
'crop' => $fileReference['crop'] ? \json_decode($fileReference['crop'], true) : null,
'autoplay' => (bool) $fileReference['autoplay'],
'file' => [] !== $file ? $file['id'] : null,
'file' => !empty($file) ? $file['id'] : null,
'url' => $this->getAbsoluteFileUrl($file),
];
}
Expand Down

0 comments on commit 59ecab6

Please sign in to comment.