We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9439018 commit 0ac7c8dCopy full SHA for 0ac7c8d
app/code/Magento/Checkout/Controller/Sidebar/UpdateItemQty.php
@@ -62,9 +62,14 @@ public function __construct(
62
63
/**
64
* @return $this
65
+ * @throws LocalizedException
66
*/
67
public function execute()
68
{
69
+ if (!$this->getRequest()->isPost()) {
70
+ throw new LocalizedException(__('Wrong request.'));
71
+ }
72
+
73
$itemId = (int)$this->getRequest()->getParam('item_id');
74
$itemQty = (float)$this->getRequest()->getParam('item_qty') * 1;
75
$itemQty = $this->quantityProcessor->prepareQuantity($itemQty);
0 commit comments