Skip to content

Commit 4fe757d

Browse files
committed
MC-31551: Category images are broken after migrating to 2.3.4
- add excetion for phpcs
1 parent 757a9a5 commit 4fe757d

File tree

1 file changed

+3
-1
lines changed
  • app/code/Magento/CatalogGraphQl/Model/Resolver/Category

1 file changed

+3
-1
lines changed

app/code/Magento/CatalogGraphQl/Model/Resolver/Category/Image.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,11 +81,13 @@ public function resolve(
8181
*/
8282
private function formatFileNameWithMediaCategoryFolder(string $fileName): string
8383
{
84+
// phpcs:ignore Magento2.Functions.DiscouragedFunction
85+
$baseFileName = basename($fileName);
8486
return '/'
8587
. $this->directoryList->getUrlPath('media')
8688
. '/'
8789
. ltrim(FileInfo::ENTITY_MEDIA_PATH, '/')
8890
. '/'
89-
. basename($fileName);
91+
. $baseFileName;
9092
}
9193
}

0 commit comments

Comments
 (0)