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 9
9
use Magento \Framework \Controller \ResultFactory ;
10
10
use Magento \Catalog \Controller \Adminhtml \Product \Builder ;
11
11
use Magento \Backend \App \Action \Context ;
12
+ use Magento \Framework \Exception \NotFoundException ;
12
13
use Magento \Ui \Component \MassAction \Filter ;
13
14
use Magento \Catalog \Model \ResourceModel \Product \CollectionFactory ;
14
15
@@ -45,9 +46,14 @@ public function __construct(
45
46
46
47
/**
47
48
* @return \Magento\Backend\Model\View\Result\Redirect
49
+ * @throws NotFoundException
50
+ * @throws \Magento\Framework\Exception\LocalizedException
48
51
*/
49
52
public function execute ()
50
53
{
54
+ if (!$ this ->getRequest ()->isPost ()) {
55
+ throw new NotFoundException (__ ('Page not found ' ));
56
+ }
51
57
$ collection = $ this ->filter ->getCollection ($ this ->collectionFactory ->create ());
52
58
$ productDeleted = 0 ;
53
59
foreach ($ collection ->getItems () as $ product ) {
You can’t perform that action at this time.
0 commit comments