Skip to content

Commit

Permalink
Fixes #3544 AZBackgroundMediaFormatter Breaks with Missing Files (#3545)
Browse files Browse the repository at this point in the history
  • Loading branch information
tadean authored and joeparsons committed Jul 30, 2024
1 parent 4b47a3a commit a8c60bd
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -586,6 +586,9 @@ protected function image(array $settings, MediaInterface $media): array {
$css_settings = $settings['css_settings'];
$fid = $media->getSource()->getSourceFieldValue($media);
$file = $this->entityTypeManager->getStorage('file')->load($fid);
if (empty($file)) {
return $az_background_media;
}
$file_uri = $file->getFileUri();

if ($settings['style'] !== 'bottom') {
Expand Down

0 comments on commit a8c60bd

Please sign in to comment.