Skip to content

Commit 3da3024

Browse files
committed
TASK: Further narrow down counting of thumbnail generations
1 parent 7a91467 commit 3da3024

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

Classes/Aspect/CollectDebugInformationAspect.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,8 @@ public function addGeneratedThumbnails(JoinPointInterface $joinPoint): void
199199
{
200200
/** @var AssetInterface $asset */
201201
$asset = $joinPoint->getMethodArgument('asset');
202-
if ($asset instanceof Thumbnail) {
202+
$thumbnailOrOriginalAsset = $joinPoint->getResult();
203+
if ($asset && $thumbnailOrOriginalAsset instanceof Thumbnail) {
203204
if (!array_key_exists($asset->getResource()->getSha1(), $this->thumbnails)) {
204205
$this->thumbnails[$asset->getResource()->getSha1()] = 1;
205206
} else {

0 commit comments

Comments
 (0)