Skip to content

Commit 5a5a246

Browse files
committed
MC-17765: Category A image replaced by uploading to Category B
1 parent 486bd9b commit 5a5a246

File tree

2 files changed

+3
-5
lines changed
  • app/code/Magento/Catalog

2 files changed

+3
-5
lines changed

app/code/Magento/Catalog/Model/Category/Attribute/Backend/Image.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
*/
66
namespace Magento\Catalog\Model\Category\Attribute\Backend;
77

8-
use Magento\Catalog\Model\ImageUploader;
98
use Magento\Framework\App\Filesystem\DirectoryList;
109
use Magento\Framework\File\Uploader;
1110

@@ -137,15 +136,15 @@ public function beforeSave($object)
137136
}
138137

139138
/**
140-
* @return ImageUploader
139+
* @return \Magento\Catalog\Model\ImageUploader
141140
*
142141
* @deprecated 101.0.0
143142
*/
144143
private function getImageUploader()
145144
{
146145
if ($this->imageUploader === null) {
147146
$this->imageUploader = \Magento\Framework\App\ObjectManager::getInstance()
148-
->get(ImageUploader::class);
147+
->get(\Magento\Catalog\CategoryImageUpload::class);
149148
}
150149

151150
return $this->imageUploader;

app/code/Magento/Catalog/Test/Unit/Model/Category/Attribute/Backend/ImageTest.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
*/
66
namespace Magento\Catalog\Test\Unit\Model\Category\Attribute\Backend;
77

8-
use Magento\Catalog\Model\ImageUploader;
98
use Magento\Framework\App\Filesystem\DirectoryList;
109
use Magento\Framework\Filesystem\Directory\WriteInterface;
1110

@@ -269,7 +268,7 @@ private function setUpModelForAfterSave()
269268
$objectManagerMock->expects($this->any())
270269
->method('get')
271270
->will($this->returnCallback(function ($class, $params = []) use ($imageUploaderMock) {
272-
if ($class == ImageUploader::class) {
271+
if ($class == \Magento\Catalog\CategoryImageUpload::class) {
273272
return $imageUploaderMock;
274273
}
275274

0 commit comments

Comments
 (0)