Skip to content

Instantly share code, notes, and snippets.

@DanielRiezebos
Last active January 2, 2020 11:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DanielRiezebos/7386328bd263d6e1fa14bf5d577c30f2 to your computer and use it in GitHub Desktop.
Save DanielRiezebos/7386328bd263d6e1fa14bf5d577c30f2 to your computer and use it in GitHub Desktop.
--- a/vendor/magento/module-catalog/Model/Category/Attribute/Backend/Image.php 2020-01-02 11:51:58.694620443 +0100
+++ b/vendor/magento/module-catalog/Model/Category/Attribute/Backend/Image.php 2020-01-02 12:06:08.734544971 +0100
@@ -125,7 +125,9 @@
}
if ($imageName = $this->getUploadedImageName($value)) {
- $imageName = $this->checkUniqueImageName($imageName);
+ if (array_key_exists('tmp_name', $value[0])) {
+ $imageName = $this->checkUniqueImageName($imageName);
+ }
$object->setData($this->additionalData . $attributeName, $value);
$object->setData($attributeName, $imageName);
} elseif (!is_string($value)) {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment