Skip to content

Commit 575d7d9

Browse files
committed
MAGETWO-63599: [GitHub] catalog:images:resize = getimagesize(): Read error! in vendor/magento/module-catalog/Model/Product/Image.php on line 410 if an image is 0 bytes #8204
- Fix for integration tests
1 parent 92e2b9e commit 575d7d9

File tree

1 file changed

+2
-2
lines changed
  • lib/internal/Magento/Framework/Image/Adapter

1 file changed

+2
-2
lines changed

lib/internal/Magento/Framework/Image/Adapter/Gd2.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ protected function _reset()
6060
*/
6161
public function open($filename)
6262
{
63-
if (filesize($filename) === 0) {
64-
throw new \InvalidArgumentException("Wrong file size: '{$filename}'.");
63+
if (!$filename || filesize($filename) === 0) {
64+
throw new \InvalidArgumentException('Wrong file');
6565
}
6666
$this->_fileName = $filename;
6767
$this->_reset();

0 commit comments

Comments
 (0)