Skip to content

Commit d6de67d

Browse files
ENGCOM-4800: Error on design configuration save with imageUploader form element po… #22132
- Merge Pull Request #22132 from yvechirko/magento2:#21032_Error_on_design_configuration_save_with_imageUploader - Merged commits: 1. 2022307
2 parents f106d73 + 2022307 commit d6de67d

File tree

1 file changed

+1
-1
lines changed
  • app/code/Magento/Theme/Model/Design/Backend

1 file changed

+1
-1
lines changed

app/code/Magento/Theme/Model/Design/Backend/File.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ private function getMime()
235235
*/
236236
private function getRelativeMediaPath(string $path): string
237237
{
238-
return str_replace('/pub/media/', '', $path);
238+
return preg_replace('/\/(pub\/)?media\//', '', $path);
239239
}
240240

241241
/**

0 commit comments

Comments
 (0)