Skip to content

Commit

Permalink
Error on design configuration save with imageUploader form element po…
Browse files Browse the repository at this point in the history
…pulated from gallery #21032
  • Loading branch information
yvechirko committed Apr 3, 2019
1 parent 4a28abb commit 2022307
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/code/Magento/Theme/Model/Design/Backend/File.php
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ private function getMime()
*/
private function getRelativeMediaPath(string $path): string
{
return str_replace('/pub/media/', '', $path);
return preg_replace('/\/(pub\/)?media\//', '', $path);
}

/**
Expand Down

0 comments on commit 2022307

Please sign in to comment.