From a89e6ed21e7044fa29d75866d7041af9b209fb7c Mon Sep 17 00:00:00 2001 From: Milind Singh Date: Sat, 29 Dec 2018 15:00:45 +0530 Subject: [PATCH] Update Download.php --- app/code/Magento/Downloadable/Helper/Download.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/app/code/Magento/Downloadable/Helper/Download.php b/app/code/Magento/Downloadable/Helper/Download.php index 50f8d757d5537..0da899dcbce84 100644 --- a/app/code/Magento/Downloadable/Helper/Download.php +++ b/app/code/Magento/Downloadable/Helper/Download.php @@ -200,10 +200,11 @@ 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'])){ + 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']; + } else { + return $this->_handle->stat($this->_resourceFile)['type']; + } } return $this->_contentType; }