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 @@ -134,11 +134,14 @@ public function afterSave($object)
134
134
{
135
135
$ value = $ object ->getData ($ this ->additionalData . $ this ->getAttribute ()->getName ());
136
136
137
- if ($ imageName = $ this ->getUploadedImageName ($ value )) {
138
- try {
139
- $ this ->getImageUploader ()->moveFileFromTmp ($ imageName );
140
- } catch (\Exception $ e ) {
141
- $ this ->_logger ->critical ($ e );
137
+ if (isset ($ value [0 ]['tmp_name ' ])) {
138
+ // A file was just uploaded, so process it
139
+ if ($ imageName = $ this ->getUploadedImageName ($ value )) {
140
+ try {
141
+ $ this ->getImageUploader ()->moveFileFromTmp ($ imageName );
142
+ } catch (\Exception $ e ) {
143
+ $ this ->_logger ->critical ($ e );
144
+ }
142
145
}
143
146
}
144
147
You can’t perform that action at this time.
0 commit comments