Skip to content

Commit b1b66f3

Browse files
authored
Update LocalAdapter.php (#43468)
1 parent 48a1759 commit b1b66f3

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

plugins/filesystem/local/src/Adapter/LocalAdapter.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -952,10 +952,8 @@ private function getThumbnail(string $path): string
952952
*/
953953
private function createThumbnail(string $path, string $thumbnailPath): bool
954954
{
955-
$image = new Image($path);
956-
957955
try {
958-
$image->createThumbnails([$this->thumbnailSize[0] . 'x' . $this->thumbnailSize[1]], $image::SCALE_INSIDE, \dirname($thumbnailPath), true);
956+
(new Image($path))->createThumbnails([$this->thumbnailSize[0] . 'x' . $this->thumbnailSize[1]], Image::SCALE_INSIDE, \dirname($thumbnailPath), true);
959957
} catch (\Exception $e) {
960958
return false;
961959
}

0 commit comments

Comments
 (0)