Skip to content

Commit 8b11156

Browse files
committed
MAGETWO-51910: CSRF delete the cart items
1 parent e438461 commit 8b11156

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ protected function jsonResponse($error = '')
104104
*/
105105
private function getFormKeyValidator()
106106
{
107-
if(!$this->formKeyValidator) {
107+
if (!$this->formKeyValidator) {
108108
$this->formKeyValidator = \Magento\Framework\App\ObjectManager::getInstance()
109109
->get(\Magento\Framework\Data\Form\FormKey\Validator::class);
110110
}

app/code/Magento/Checkout/Test/Unit/Controller/Sidebar/RemoveItemTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88
use Magento\Framework\Exception\LocalizedException;
99
use Magento\Framework\TestFramework\Unit\Helper\ObjectManager as ObjectManagerHelper;
1010

11+
/**
12+
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
13+
*/
1114
class RemoveItemTest extends \PHPUnit_Framework_TestCase
1215
{
1316
/** @var \Magento\Checkout\Controller\Sidebar\RemoveItem */

0 commit comments

Comments
 (0)