Skip to content

Commit d492274

Browse files
Stanislav Idolovmage2pratik
Stanislav Idolov
authored andcommitted
Fixed variable name & repository usage
1 parent f4d837d commit d492274

File tree

1 file changed

+3
-3
lines changed
  • app/code/Magento/CheckoutAgreements/Controller/Adminhtml/Agreement

1 file changed

+3
-3
lines changed

app/code/Magento/CheckoutAgreements/Controller/Adminhtml/Agreement/Delete.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,15 @@ public function __construct(
4040
public function execute()
4141
{
4242
$id = (int)$this->getRequest()->getParam('id');
43-
$repository = $this->agreementRepository->get($id);
44-
if (!$repository->getAgreementId()) {
43+
$agreement = $this->agreementRepository->get($id);
44+
if (!$agreement->getAgreementId()) {
4545
$this->messageManager->addError(__('This condition no longer exists.'));
4646
$this->_redirect('checkout/*/');
4747
return;
4848
}
4949

5050
try {
51-
$repository->delete();
51+
$this->agreementRepository->delete($agreement);
5252
$this->messageManager->addSuccess(__('You deleted the condition.'));
5353
$this->_redirect('checkout/*/');
5454
return;

0 commit comments

Comments
 (0)