From f0670b6675875620a0a92c57e96d943de3eb6e1b Mon Sep 17 00:00:00 2001 From: Shikha Mishra Date: Thu, 27 Dec 2018 22:12:21 +0530 Subject: [PATCH] Updated Download.php --- app/code/Magento/Downloadable/Helper/Download.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/code/Magento/Downloadable/Helper/Download.php b/app/code/Magento/Downloadable/Helper/Download.php index 910eaa42f0e84..50f8d757d5537 100644 --- a/app/code/Magento/Downloadable/Helper/Download.php +++ b/app/code/Magento/Downloadable/Helper/Download.php @@ -200,6 +200,9 @@ public function getContentType() return $this->_downloadableFile->getFileType($this->_resourceFile); } } elseif ($this->_linkType == self::LINK_TYPE_URL) { + if(is_array($this->_handle->stat($this->_resourceFile)['type'])){ + return end($this->_handle->stat($this->_resourceFile)['type']); + }else return $this->_handle->stat($this->_resourceFile)['type']; } return $this->_contentType;