We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 32fda1c commit 7339324Copy full SHA for 7339324
lib/internal/Magento/Framework/File/Uploader.php
@@ -803,7 +803,8 @@ public static function getNewFileName($destinationFile)
803
$fileInfo = pathinfo($destinationFile);
804
$index = 1;
805
while ($fileExists($fileInfo['dirname'] . '/' . $fileInfo['basename'])) {
806
- $fileInfo['basename'] = $fileInfo['filename'] . '_' . $index++ . '.' . $fileInfo['extension'];
+ $fileInfo['basename'] = $fileInfo['filename'] . '_' . ($index++);
807
+ $fileInfo['basename'] .= isset($fileInfo['extension']) ? '.' . $fileInfo['extension'] : '';
808
}
809
810
return $fileInfo['basename'];
0 commit comments