Skip to content

Commit 1a46d9f

Browse files
committed
Merge branch 'MAGETWO-44274' into 'master3'
Fix bug: Couldn't retrive a remote preview image file. See merge request !147
2 parents 8157da9 + b676f74 commit 1a46d9f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

app/code/Magento/ProductVideo/Controller/Adminhtml/Product/Gallery/RetrieveImage.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,9 @@ protected function retrieveRemoteImage($fileUrl, $localFilePath)
131131
$this->curl->setConfig(['header' => false]);
132132
$this->curl->write('GET', $fileUrl);
133133
$image = $this->curl->read();
134+
if (empty($image)) {
135+
throw new \InvalidArgumentException(__('Couldn\'t retrive a remote preview image file. Service is inaccessible.'));
136+
}
134137
$this->fileUtility->saveFile($localFilePath, $image);
135138
}
136139

0 commit comments

Comments
 (0)