Skip to content

Commit d13b1fe

Browse files
author
okarpenko
committed
MAGETWO-45073: PHP notice during to create Text Swatch product attribute
1 parent 4577b30 commit d13b1fe

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

app/code/Magento/Swatches/Model/Plugin/EavAttribute.php

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -50,27 +50,19 @@ class EavAttribute
5050
*/
5151
protected $isSwatchExists;
5252

53-
/**
54-
* @var \Magento\Framework\Message\ManagerInterface
55-
*/
56-
protected $messageManager;
57-
5853
/**
5954
* @param \Magento\Swatches\Model\ResourceModel\Swatch\CollectionFactory $collectionFactory
6055
* @param \Magento\Swatches\Model\SwatchFactory $swatchFactory
6156
* @param \Magento\Swatches\Helper\Data $swatchHelper
62-
* @param \Magento\Framework\Message\ManagerInterface $messageManager
6357
*/
6458
public function __construct(
6559
\Magento\Swatches\Model\ResourceModel\Swatch\CollectionFactory $collectionFactory,
6660
\Magento\Swatches\Model\SwatchFactory $swatchFactory,
67-
\Magento\Swatches\Helper\Data $swatchHelper,
68-
\Magento\Framework\Message\ManagerInterface $messageManager
61+
\Magento\Swatches\Helper\Data $swatchHelper
6962
) {
7063
$this->swatchCollectionFactory = $collectionFactory;
7164
$this->swatchFactory = $swatchFactory;
7265
$this->swatchHelper = $swatchHelper;
73-
$this->messageManager = $messageManager;
7466
}
7567

7668
/**
@@ -172,7 +164,7 @@ protected function processSwatchOptions(Attribute $attribute)
172164

173165
if (!empty($optionsArray) && is_array($optionsArray)) {
174166
$optionsArray = $this->prepareOptionIds($optionsArray);
175-
$attributeSavedOptions = $attribute->getSource()->getAllOptions(false);
167+
$attributeSavedOptions = $attribute->getSource()->getAllOptions();
176168
$this->prepareOptionLinks($optionsArray, $attributeSavedOptions);
177169
}
178170

0 commit comments

Comments
 (0)