Skip to content

Commit d524c1c

Browse files
Github issue 34380: Added "HttpPostActionInterface" to implements and removes check.
1 parent 0ac7c8d commit d524c1c

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

app/code/Magento/Checkout/Controller/Sidebar/UpdateItemQty.php

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,9 @@
1414
use Magento\Framework\Exception\LocalizedException;
1515
use Magento\Framework\Json\Helper\Data;
1616
use Psr\Log\LoggerInterface;
17+
use Magento\Framework\App\Action\HttpPostActionInterface;
1718

18-
class UpdateItemQty extends Action
19+
class UpdateItemQty extends Action implements HttpPostActionInterface
1920
{
2021
/**
2122
* @var Sidebar
@@ -62,14 +63,9 @@ public function __construct(
6263

6364
/**
6465
* @return $this
65-
* @throws LocalizedException
6666
*/
6767
public function execute()
6868
{
69-
if (!$this->getRequest()->isPost()) {
70-
throw new LocalizedException(__('Wrong request.'));
71-
}
72-
7369
$itemId = (int)$this->getRequest()->getParam('item_id');
7470
$itemQty = (float)$this->getRequest()->getParam('item_qty') * 1;
7571
$itemQty = $this->quantityProcessor->prepareQuantity($itemQty);

0 commit comments

Comments
 (0)