Skip to content

Commit 8522a14

Browse files
committed
Fix #19872 - replace DirectoryList::PUB with string
1 parent 112476a commit 8522a14

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/code/Magento/Catalog/Model/Category/FileInfo.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ private function getMediaDirectoryPathRelativeToBaseDirectoryPath(string $filePa
178178
$mediaDirectoryPath = $this->getMediaDirectory()->getAbsolutePath();
179179

180180
$mediaDirectoryRelativeSubpath = substr($mediaDirectoryPath, strlen($baseDirectoryPath));
181-
$pubDirectory = DirectoryList::PUB . DIRECTORY_SEPARATOR;
181+
$pubDirectory = 'pub' . DIRECTORY_SEPARATOR;
182182

183183
if (strpos($mediaDirectoryRelativeSubpath, $pubDirectory) === 0 && strpos($filePath, $pubDirectory) !== 0) {
184184
$mediaDirectoryRelativeSubpath = substr($mediaDirectoryRelativeSubpath, strlen($pubDirectory));

0 commit comments

Comments
 (0)