Skip to content

Commit 057f47b

Browse files
glo80326glo71317
authored andcommitted
BUG#AC-1246: AdminAdobeStockVerifyUnlicensedLabelTest issues fixed
1 parent e4271a3 commit 057f47b

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

app/code/Magento/MediaGallerySynchronization/Model/CreateAssetFromFile.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -98,12 +98,12 @@ public function execute(string $path): AssetInterface
9898
[
9999
'id' => null,
100100
'path' => $path,
101-
'title' => $meta['basename'],
102-
'width' => $meta['extra']['image-width'],
103-
'height' => $meta['extra']['image-height'],
101+
'title' => $meta['basename'] ?? '',
102+
'width' => $meta['extra']['image-width'] ?? 0,
103+
'height' => $meta['extra']['image-height'] ?? 0,
104104
'hash' => $this->getHash($path),
105-
'size' => $meta['size'],
106-
'contentType' => 'image/' . $meta['extension'],
105+
'size' => $meta['size'] ?? 0,
106+
'contentType' => sprintf('%s/%s', 'image', $meta['extension'] ?? ''),
107107
'source' => 'Local'
108108
]
109109
);

0 commit comments

Comments
 (0)