From a3a0002940b0509dded2bebec8ec175b782cc4db Mon Sep 17 00:00:00 2001 From: Clement Beudot Date: Wed, 25 Jan 2017 14:27:57 +0100 Subject: [PATCH] bug #8277 removed useless exception throws as there is already a preg_match on https? --- .../Magento/CatalogImportExport/Model/Import/Uploader.php | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/app/code/Magento/CatalogImportExport/Model/Import/Uploader.php b/app/code/Magento/CatalogImportExport/Model/Import/Uploader.php index ea695a734b844..bfe0802b2e864 100644 --- a/app/code/Magento/CatalogImportExport/Model/Import/Uploader.php +++ b/app/code/Magento/CatalogImportExport/Model/Import/Uploader.php @@ -148,7 +148,7 @@ public function init() /** * Proceed moving a file from TMP to destination folder * - * @param string $fileName + * @param $fileName * @param bool $renameFileOff * @return array */ @@ -162,12 +162,8 @@ public function move($fileName, $renameFileOff = false) if ($matches[0] === self::HTTP_SCHEME) { $read = $this->_readFactory->create($url, DriverPool::HTTP); - } elseif ($matches[0] === self::HTTPS_SCHEME) { - $read = $this->_readFactory->create($url, DriverPool::HTTPS); } else { - throw new LocalizedException( - __('No adapted DriverPool for File \'%1\'.', $fileName) - ); + $read = $this->_readFactory->create($url, DriverPool::HTTPS); } $fileName = preg_replace('/[^a-z0-9\._-]+/i', '', $fileName);