Skip to content

Commit 30251d9

Browse files
ENGCOM-4275: Fix issue with custom option file uploading #21170
- Merge Pull Request #21170 from nikolaevas/magento2:sys-tmp-fix - Merged commits: 1. fa0a22d 2. 2ed46ad
2 parents 3b2e305 + 2ed46ad commit 30251d9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/internal/Magento/Framework/Filesystem/DirectoryList.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,8 @@ public function __construct($root, array $config = [])
9696
static::validate($config);
9797
$this->root = $this->normalizePath($root);
9898
$this->directories = static::getDefaultConfig();
99-
$this->directories[self::SYS_TMP] = [self::PATH => realpath(sys_get_temp_dir())];
99+
$sysTmpPath = ini_get('upload_tmp_dir') ? ini_get('upload_tmp_dir') : sys_get_temp_dir();
100+
$this->directories[self::SYS_TMP] = [self::PATH => realpath($sysTmpPath)];
100101

101102
// inject custom values from constructor
102103
foreach ($this->directories as $code => $dir) {

0 commit comments

Comments
 (0)