Skip to content

Commit 346edac

Browse files
MorozovaNPstkorf
authored andcommitted
MAGETWO-63599: Check of image size is moved to _canProcess() method
1 parent 47f6159 commit 346edac

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ public function getImageType()
307307
if ($this->_fileType) {
308308
return $this->_fileType;
309309
} else {
310-
if ($this->_canProcess() && filesize($this->_fileName) > 0) {
310+
if ($this->_canProcess()) {
311311
list($this->_imageSrcWidth, $this->_imageSrcHeight, $this->_fileType) = getimagesize($this->_fileName);
312312
return $this->_fileType;
313313
}
@@ -709,7 +709,7 @@ protected function _prepareDestination($destination = null, $newName = null)
709709
*/
710710
protected function _canProcess()
711711
{
712-
return !empty($this->_fileName);
712+
return !empty($this->_fileName) && filesize($this->_fileName) > 0;
713713
}
714714

715715
/**

0 commit comments

Comments
 (0)