Skip to content

Commit 2fb39af

Browse files
committed
Merge remote-tracking branch 'origin/MC-18100' into 2.2.10-develop-pr106
2 parents fad3a6d + 3f565ba commit 2fb39af

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/internal/Magento/Framework/File/Uploader.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,8 @@ public function __construct(
181181
Mime $fileMime = null,
182182
DirectoryList $directoryList = null
183183
) {
184+
$this->directoryList = $directoryList ?: \Magento\Framework\App\ObjectManager::getInstance()
185+
->get(DirectoryList::class);
184186
$this->_setUploadFileId($fileId);
185187
if (!file_exists($this->_file['tmp_name'])) {
186188
$code = empty($this->_file['tmp_name']) ? self::TMP_NAME_EMPTY : 0;
@@ -189,8 +191,6 @@ public function __construct(
189191
$this->_fileExists = true;
190192
}
191193
$this->fileMime = $fileMime ?: \Magento\Framework\App\ObjectManager::getInstance()->get(Mime::class);
192-
$this->directoryList= $directoryList ?: \Magento\Framework\App\ObjectManager::getInstance()
193-
->get(DirectoryList::class);
194194
}
195195

196196
/**

0 commit comments

Comments
 (0)