Skip to content

Commit 50f5c6b

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 3. 9f4681a 4. aeedfcd
2 parents 8879ce4 + aeedfcd commit 50f5c6b

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
@@ -8,6 +8,7 @@
88
* Copyright © Magento, Inc. All rights reserved.
99
* See COPYING.txt for license details.
1010
*/
11+
1112
namespace Magento\Framework\Filesystem;
1213

1314
/**
@@ -96,7 +97,7 @@ public function __construct($root, array $config = [])
9697
static::validate($config);
9798
$this->root = $this->normalizePath($root);
9899
$this->directories = static::getDefaultConfig();
99-
$sysTmpPath = ini_get('upload_tmp_dir') ? ini_get('upload_tmp_dir') : sys_get_temp_dir();
100+
$sysTmpPath = get_cfg_var('upload_tmp_dir') ?: sys_get_temp_dir();
100101
$this->directories[self::SYS_TMP] = [self::PATH => realpath($sysTmpPath)];
101102

102103
// inject custom values from constructor

0 commit comments

Comments
 (0)