Skip to content

Commit e9499e3

Browse files
author
Dmytro Voskoboinikov
committed
Merge branch 'MAGETWO-92174' into 2.1.15-bugfixes-010818
2 parents 56961d4 + 9fa2306 commit e9499e3

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
use Magento\Framework\Controller\ResultFactory;
1010
use Magento\Catalog\Controller\Adminhtml\Product\Builder;
1111
use Magento\Backend\App\Action\Context;
12+
use Magento\Framework\Exception\NotFoundException;
1213
use Magento\Ui\Component\MassAction\Filter;
1314
use Magento\Catalog\Model\ResourceModel\Product\CollectionFactory;
1415

@@ -45,9 +46,14 @@ public function __construct(
4546

4647
/**
4748
* @return \Magento\Backend\Model\View\Result\Redirect
49+
* @throws NotFoundException
50+
* @throws \Magento\Framework\Exception\LocalizedException
4851
*/
4952
public function execute()
5053
{
54+
if (!$this->getRequest()->isPost()) {
55+
throw new NotFoundException(__('Page not found'));
56+
}
5157
$collection = $this->filter->getCollection($this->collectionFactory->create());
5258
$productDeleted = 0;
5359
foreach ($collection->getItems() as $product) {

0 commit comments

Comments
 (0)