Skip to content

Commit

Permalink
Fixed #2463
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonkelly committed Feb 21, 2018
1 parent cb58eaa commit 30db5af
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CHANGELOG-v3.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

## Unreleased

### Fixed
- Fixed an error that occurred when creating a new transform or thumbnail for a remotely-stored image, if Craft didn’t already have a copy of the image cached locally. ([#2463](https://github.com/craftcms/cms/issues/2463))

## 3.0.0-RC11 - 2018-02-20

### Added
Expand Down
2 changes: 1 addition & 1 deletion src/services/AssetTransforms.php
Original file line number Diff line number Diff line change
Expand Up @@ -816,7 +816,7 @@ public function getLocalImageSource(Asset $asset): string
if (!is_file($imageSourcePath) || filesize($imageSourcePath) === 0) {

// Delete it just in case it's a 0-byter
if (!FileHelper::unlink($imageSourcePath)) {
if (file_exists($imageSourcePath) && !FileHelper::unlink($imageSourcePath)) {
Craft::warning("Unable to delete the file \"{$imageSourcePath}\".", __METHOD__);
}

Expand Down

0 comments on commit 30db5af

Please sign in to comment.