Skip to content

Commit

Permalink
fix: [TOYS-923] ApplePay - Passing null to parameter #1 ($num) of typ…
Browse files Browse the repository at this point in the history
…e float is deprecated
  • Loading branch information
pledwig-creativestyle committed Jul 17, 2023
1 parent 7e5e6cc commit 362640f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
.idea/
/tmp.repo.magento.com.json
/tools/tmp.repo.magento.com.json
13 changes: 13 additions & 0 deletions optional/mollie/magento2/cast_null_total_value_to_zero.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/Controller/ApplePay/ShippingMethods.php b/Controller/ApplePay/ShippingMethods.php
index 50be298..0387525 100644
--- a/Controller/ApplePay/ShippingMethods.php
+++ b/Controller/ApplePay/ShippingMethods.php
@@ -119,7 +119,7 @@ class ShippingMethods extends Action
return [
'type' => 'final',
'label' => $total->getData('title'),
- 'amount' => number_format($total->getData('value'), 2, '.', ''),
+ 'amount' => number_format((float)$total->getData('value'), 2, '.', ''),
];
}, array_values($cart->getTotals()))
]);

0 comments on commit 362640f

Please sign in to comment.