File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed
app/code/Magento/Catalog/Controller/Adminhtml/Product Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change 11
11
use Magento \Ui \Component \MassAction \Filter ;
12
12
use Magento \Catalog \Model \ResourceModel \Product \CollectionFactory ;
13
13
use Magento \Catalog \Api \ProductRepositoryInterface ;
14
+ use Magento \Framework \Exception \NotFoundException ;
14
15
15
16
class MassDelete extends \Magento \Catalog \Controller \Adminhtml \Product
16
17
{
@@ -54,9 +55,15 @@ public function __construct(
54
55
55
56
/**
56
57
* @return \Magento\Backend\Model\View\Result\Redirect
58
+ * @throws NotFoundException
59
+ * @throws \Magento\Framework\Exception\LocalizedException
60
+ * @throws \Magento\Framework\Exception\StateException
57
61
*/
58
62
public function execute ()
59
63
{
64
+ if (!$ this ->getRequest ()->isPost ()) {
65
+ throw new NotFoundException (__ ('Page not found ' ));
66
+ }
60
67
$ collection = $ this ->filter ->getCollection ($ this ->collectionFactory ->create ());
61
68
$ productDeleted = 0 ;
62
69
/** @var \Magento\Catalog\Model\Product $product */
You can’t perform that action at this time.
0 commit comments