Skip to content

Commit

Permalink
Merge pull request #5107 in SW/shopware from sw-18142/5.2/fix-jpg-rep…
Browse files Browse the repository at this point in the history
…lacement to 5.2

* commit '48761d48a8173c371bd5908d771f3474bad5dee4':
  SW-18142 - Fixed replaced name for JPG files in media model Fixes: shopware/shopware#1040
  • Loading branch information
OliverSkroblin committed Jul 3, 2017
2 parents 74fe5b4 + 48761d4 commit 2487784
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions engine/Shopware/Models/Media/Media.php
Original file line number Diff line number Diff line change
Expand Up @@ -2295,9 +2295,9 @@ private function setFileInfo()
}

// make sure that the name don't contains the file extension.
$name = str_replace('.' . $extension, '', $name);
$name = str_ireplace('.' . $extension, '', $name);
if ($extension === 'jpeg') {
$name = str_replace('.jpg', '', $name);
$name = str_ireplace('.jpg', '', $name);
}

//set the file type using the type mapping
Expand Down

0 comments on commit 2487784

Please sign in to comment.