Skip to content

Commit

Permalink
Fixed #11196
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonkelly committed May 11, 2022
1 parent ffc9580 commit c14f8fe
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Expand Up @@ -17,6 +17,7 @@
- Fixed a bug where Assets fields’ “Upload files” buttons weren’t wrapping when there wasn’t enough space to show them alongside “Add an asset”. ([#11133](https://github.com/craftcms/cms/issues/11133))
- Fixed a bug where `Craft.getUrl()` was appending empty query strings to URLs when they weren’t needed. ([#11159](https://github.com/craftcms/cms/issues/11159))
- Fixed a bug where addresses could validate the wrong set of required fields, if the validation rules were invoked before the country code was set. ([#11162](https://github.com/craftcms/cms/issues/11162))
- Fixed an error that could occur when rendering the thumbnail preview for an asset, if its file was missing. ([#11196](https://github.com/craftcms/cms/issues/11196))

## 4.0.1 - 2022-05-06

Expand Down
2 changes: 1 addition & 1 deletion src/services/Assets.php
Expand Up @@ -609,7 +609,7 @@ public function getThumbUrl(Asset $asset, int $width, ?int $height = null): stri
'mode' => 'crop',
]);

return $asset->getUrl($transform, false);
return $asset->getUrl($transform, false) ?? AssetsHelper::iconUrl($extension);
}

/**
Expand Down

0 comments on commit c14f8fe

Please sign in to comment.