File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
app/code/Magento/Catalog/Controller/Adminhtml/Product Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change 99use Magento \Framework \Controller \ResultFactory ;
1010use Magento \Catalog \Controller \Adminhtml \Product \Builder ;
1111use Magento \Backend \App \Action \Context ;
12+ use Magento \Framework \Exception \NotFoundException ;
1213use Magento \Ui \Component \MassAction \Filter ;
1314use 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 ) {
You can’t perform that action at this time.
0 commit comments