Skip to content

Commit

Permalink
Fix fatal type error on cancel
Browse files Browse the repository at this point in the history
  • Loading branch information
Matt75 committed Oct 2, 2024
1 parent 4511b2a commit d1a73a3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion controllers/front/cancel.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,9 @@ public function postProcess()
$isExpressCheckout = isset($bodyValues['isExpressCheckout']) && $bodyValues['isExpressCheckout'];
$isHostedFields = isset($bodyValues['isHostedFields']) && $bodyValues['isHostedFields'];
$reason = isset($bodyValues['reason']) ? Tools::safeOutput($bodyValues['reason']) : null;
$error = isset($bodyValues['error']) ? Tools::safeOutput($bodyValues['error']) : null;
$error = isset($bodyValues['error'])
? Tools::safeOutput(is_string($bodyValues['error']) ? $bodyValues['error'] : json_encode($bodyValues['error']))
: null;

if ($orderId) {
/** @var CommandBusInterface $commandBus */
Expand Down

0 comments on commit d1a73a3

Please sign in to comment.