Skip to content

Commit

Permalink
Fix static test.
Browse files Browse the repository at this point in the history
  • Loading branch information
nmalevanec committed Feb 11, 2019
1 parent 420a06d commit c020b2c
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions app/code/Magento/Downloadable/Helper/Download.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
/**
* Downloadable Products Download Helper
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
* @SuppressWarnings(PHPMD.CookieAndSessionMisuse)
*/
class Download extends \Magento\Framework\App\Helper\AbstractHelper
{
Expand Down Expand Up @@ -261,9 +262,9 @@ public function setResource($resourceFile, $linkType = self::LINK_TYPE_FILE)
*/
if ($linkType === self::LINK_TYPE_URL) {
$headers = array_change_key_case(get_headers($this->_resourceFile, 1), CASE_LOWER);
if(isset($headers['location'])){
$this->_resourceFile = is_array($headers['location']) ? current($headers['location']):
$headers['location'];
if (isset($headers['location'])) {
$this->_resourceFile = is_array($headers['location']) ? current($headers['location'])
: $headers['location'];
}
}

Expand Down

0 comments on commit c020b2c

Please sign in to comment.