Skip to content

Commit

Permalink
Fix #1190 (#1202)
Browse files Browse the repository at this point in the history
Fix the "$_FILES array is empty" exception when assiging products to a category or creating a category with the XMLRPC-API
  • Loading branch information
Digital Pianism committed Apr 29, 2021
1 parent f71321b commit e395a3e
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ class Mage_Catalog_Model_Category_Attribute_Backend_Image extends Mage_Eav_Model
public function afterSave($object)
{
$value = $object->getData($this->getAttribute()->getName());
if (empty($value) && empty($_FILES)) {
return $this;
}

if (is_array($value) && !empty($value['delete'])) {
$object->setData($this->getAttribute()->getName(), '');
Expand Down

0 comments on commit e395a3e

Please sign in to comment.