Skip to content

Commit

Permalink
Fixed case of unexisting config path
Browse files Browse the repository at this point in the history
  • Loading branch information
fballiano committed Jul 15, 2024
1 parent 58ac21e commit bf2973a
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,8 @@ protected function _getUploadDir()
*/
protected function _getUploadRoot($token)
{
$value = Mage::getStoreConfig($token);
if (preg_match(self::SYSTEM_FILESYSTEM_REGEX, $value, $matches) !== false) {
$value = Mage::getStoreConfig($token) ?? '';
if (strlen($value) && preg_match(self::SYSTEM_FILESYSTEM_REGEX, $value, $matches) !== false) {
$dir = str_replace('root_dir', 'base_dir', $matches[1]);
$path = str_replace('/', DS, $matches[2]);
return Mage::getConfig()->getOptions()->getData($dir) . $path;
Expand Down

0 comments on commit bf2973a

Please sign in to comment.