Skip to content

Commit 6409a14

Browse files
MAGETWO-71409: Remove undeclared method #10465
2 parents 354fc11 + 1b9b4c5 commit 6409a14

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

app/code/Magento/Catalog/Controller/Adminhtml/Product/MassStatus.php

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,12 +94,17 @@ public function execute()
9494
$this->_validateMassStatus($productIds, $status);
9595
$this->_objectManager->get(\Magento\Catalog\Model\Product\Action::class)
9696
->updateAttributes($productIds, ['status' => $status], (int) $storeId);
97-
$this->messageManager->addSuccess(__('A total of %1 record(s) have been updated.', count($productIds)));
97+
$this->messageManager->addSuccessMessage(
98+
__('A total of %1 record(s) have been updated.', count($productIds))
99+
);
98100
$this->_productPriceIndexerProcessor->reindexList($productIds);
99101
} catch (\Magento\Framework\Exception\LocalizedException $e) {
100-
$this->messageManager->addError($e->getMessage());
102+
$this->messageManager->addErrorMessage($e->getMessage());
101103
} catch (\Exception $e) {
102-
$this->_getSession()->addException($e, __('Something went wrong while updating the product(s) status.'));
104+
$this->messageManager->addExceptionMessage(
105+
$e,
106+
__('Something went wrong while updating the product(s) status.')
107+
);
103108
}
104109

105110
/** @var \Magento\Backend\Model\View\Result\Redirect $resultRedirect */

0 commit comments

Comments
 (0)