File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed
app/code/Magento/Catalog/Model/Category/Attribute/Backend Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -128,11 +128,14 @@ public function afterSave($object)
128
128
{
129
129
$ value = $ object ->getData ($ this ->additionalData . $ this ->getAttribute ()->getName ());
130
130
131
- if ($ imageName = $ this ->getUploadedImageName ($ value )) {
132
- try {
133
- $ this ->getImageUploader ()->moveFileFromTmp ($ imageName );
134
- } catch (\Exception $ e ) {
135
- $ this ->_logger ->critical ($ e );
131
+ if (isset ($ value [0 ]['tmp_name ' ])) {
132
+ // A file was just uploaded, so process it
133
+ if ($ imageName = $ this ->getUploadedImageName ($ value )) {
134
+ try {
135
+ $ this ->getImageUploader ()->moveFileFromTmp ($ imageName );
136
+ } catch (\Exception $ e ) {
137
+ $ this ->_logger ->critical ($ e );
138
+ }
136
139
}
137
140
}
138
141
You can’t perform that action at this time.
0 commit comments