Skip to content

Commit 21f4e66

Browse files
author
Anton Evers
committed
Fix overwrite default value image/file with NULL
If you set a default value for a config field type image/file and you save it. It won't set the default value in the database. Instead it will save NULL and so overwrite the default config. With this change the default value will be set as value. This is a replication of what used to be in of #5085
1 parent ce5dbd5 commit 21f4e66

File tree

1 file changed

+2
-0
lines changed
  • app/code/Magento/Config/Model/Config/Backend

1 file changed

+2
-0
lines changed

app/code/Magento/Config/Model/Config/Backend/File.php

+2
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,8 @@ public function beforeSave()
110110
} else {
111111
if (is_array($value) && !empty($value['delete'])) {
112112
$this->setValue('');
113+
} elseif (is_array($value) && !empty($value['value'])) {
114+
$this->setValue($value['value']);
113115
} else {
114116
$this->unsValue();
115117
}

0 commit comments

Comments
 (0)