Skip to content

Commit 2022307

Browse files
author
Yuriy
committed
Error on design configuration save with imageUploader form element populated from gallery #21032
1 parent 4a28abb commit 2022307

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
@@ -237,7 +237,7 @@ private function getMime()
237237
*/
238238
private function getRelativeMediaPath(string $path): string
239239
{
240-
return str_replace('/pub/media/', '', $path);
240+
return preg_replace('/\/(pub\/)?media\//', '', $path);
241241
}
242242

243243
/**

0 commit comments

Comments
 (0)