File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed
Controller/Adminhtml/Category Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -82,7 +82,7 @@ protected function _filterCategoryPostData(array $rawData)
82
82
$ data = $ rawData ;
83
83
// @todo It is a workaround to prevent saving this data in category model and it has to be refactored in future
84
84
if (isset ($ data ['image ' ]) && is_array ($ data ['image ' ])) {
85
- if (is_array ( $ data [ ' image ' ]) && !empty ($ data ['image ' ]['delete ' ])) {
85
+ if (!empty ($ data ['image ' ]['delete ' ])) {
86
86
$ data ['image ' ] = null ;
87
87
} else {
88
88
if (isset ($ data ['image ' ][0 ]['name ' ]) && isset ($ data ['image ' ][0 ]['tmp_name ' ])) {
Original file line number Diff line number Diff line change @@ -91,7 +91,7 @@ public function save(\Magento\Catalog\Api\Data\CategoryInterface $category)
91
91
);
92
92
93
93
if (isset ($ existingData ['image ' ]) && is_array ($ existingData ['image ' ])) {
94
- if (is_array ( $ existingData [ ' image ' ]) && !empty ($ existingData ['image ' ]['delete ' ])) {
94
+ if (!empty ($ existingData ['image ' ]['delete ' ])) {
95
95
$ existingData ['image ' ] = null ;
96
96
} else {
97
97
if (isset ($ existingData ['image ' ][0 ]['name ' ]) && isset ($ existingData ['image ' ][0 ]['tmp_name ' ])) {
You can’t perform that action at this time.
0 commit comments