Skip to content

Commit

Permalink
MAGETWO-60366: Cannot Enable Production Mode
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Paliarush committed Nov 2, 2016
2 parents 5caae17 + e7b1fd4 commit 34fed9a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions app/code/Magento/Catalog/Model/Product/Image.php
Original file line number Diff line number Diff line change
Expand Up @@ -498,8 +498,7 @@ public function setBaseFile($file)
$path = [
$this->_catalogProductMediaConfig->getBaseMediaPath(),
'cache',
$this->_storeManager->getStore()->getId(),
$path[] = $this->getDestinationSubdir(),
$this->getDestinationSubdir(),
];
if (!empty($this->_width) || !empty($this->_height)) {
$path[] = "{$this->_width}x{$this->_height}";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ public function testSetGetBaseFile()
$this->image->setBaseFile('/somefile.png');
$this->assertEquals('catalog/product/somefile.png', $this->image->getBaseFile());
$this->assertEquals(
'catalog/product/cache/1//beff4985b56e3afdbeabfc89641a4582/somefile.png',
'catalog/product/cache//beff4985b56e3afdbeabfc89641a4582/somefile.png',
$this->image->getNewFile()
);
}
Expand Down Expand Up @@ -300,7 +300,7 @@ public function testGetUrl()
$this->testSetGetBaseFile();
$url = $this->image->getUrl();
$this->assertEquals(
'http://magento.com/media/catalog/product/cache/1//beff4985b56e3afdbeabfc89641a4582/somefile.png',
'http://magento.com/media/catalog/product/cache//beff4985b56e3afdbeabfc89641a4582/somefile.png',
$url
);
}
Expand Down

0 comments on commit 34fed9a

Please sign in to comment.