Skip to content

Commit 76040cc

Browse files
author
Shikha Mishra
authored
Updated Download.php
1 parent c4fb1ee commit 76040cc

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

app/code/Magento/Downloadable/Helper/Download.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,9 @@ public function getContentType()
198198
return $this->_downloadableFile->getFileType($this->_resourceFile);
199199
}
200200
} elseif ($this->_linkType == self::LINK_TYPE_URL) {
201+
if(is_array($this->_handle->stat($this->_resourceFile)['type'])){
202+
return end($this->_handle->stat($this->_resourceFile)['type']);
203+
}else
201204
return $this->_handle->stat($this->_resourceFile)['type'];
202205
}
203206
return $this->_contentType;

0 commit comments

Comments
 (0)