Skip to content

Commit 2ed9df5

Browse files
committed
Fix case when relative path is empty
1 parent cf30fd8 commit 2ed9df5

File tree

1 file changed

+1
-1
lines changed
  • app/code/Magento/MediaGallery/Plugin/Wysiwyg/Images

1 file changed

+1
-1
lines changed

app/code/Magento/MediaGallery/Plugin/Wysiwyg/Images/Storage.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,6 @@ private function getMediaDirectoryRelativePath(string $path): string
122122
{
123123
$relativePath = $this->filesystem->getDirectoryRead(DirectoryList::MEDIA)->getRelativePath($path);
124124

125-
return (false === strpos($relativePath, '/')) ? '/' . $relativePath : $relativePath;
125+
return ($relativePath && false === strpos($relativePath, '/')) ? '/' . $relativePath : $relativePath;
126126
}
127127
}

0 commit comments

Comments
 (0)