Skip to content

Commit

Permalink
bug magento#8277 removed useless exception throws as there is already…
Browse files Browse the repository at this point in the history
… a preg_match on https?
  • Loading branch information
clementbeudot committed Jan 25, 2017
1 parent 9dbab51 commit a3a0002
Showing 1 changed file with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand All @@ -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);
Expand Down

0 comments on commit a3a0002

Please sign in to comment.