Skip to content

Commit

Permalink
Fixed issue with undefined index of method type (#65)
Browse files Browse the repository at this point in the history
- fixed issue with undefined method type on order view page.
  • Loading branch information
ed007m authored Jun 5, 2020
1 parent e20b7a4 commit 489853d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions Block/Adminhtml/Order/View/Info/PaymentInfo.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public function getPaymentType(): string
'express_checkout' => __('Express'),
];

return (string) $paymentTypes[$paymentMethod] ?? '';
return (string) ($paymentTypes[$paymentMethod] ?? '');
}

/**
Expand All @@ -71,14 +71,14 @@ private function getPaymentMethod(): string
{
$order = $this->registry->registry('current_order');
if (!$order) {
return [];
return '';
}
$payment = $order->getPayment();
if (!$payment) {
return [];
return '';
}
$addInfo = (array) $payment->getAdditionalInformation();

return (string) $addInfo['method_type'] ?? '';
return (string) ($addInfo['method_type'] ?? '');
}
}
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"type": "magento2-module",
"description": "Vipps Payment Method",
"license": "proprietary",
"version": "2.3.4",
"version": "2.3.5",
"require": {
"magento/framework": "102.0.*",
"magento/module-sales": "102.0.*",
Expand Down

0 comments on commit 489853d

Please sign in to comment.