File tree 1 file changed +2
-2
lines changed
app/code/Magento/Quote/Model/Quote/Address
1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -56,7 +56,7 @@ public function __construct(
56
56
public function setTotalAmount ($ code , $ amount )
57
57
{
58
58
/* (Fixes issue #18027) Round the total amount to 4 decimal places, to avoid floating point overflows */
59
- $ amount = is_float ($ amount ) ? ( float ) number_format ( $ amount , 4 , " . " , "" ) : $ amount ;
59
+ $ amount = is_float ($ amount ) ? round ( $ amount , 4 ) : $ amount ;
60
60
61
61
$ this ->totalAmounts [$ code ] = $ amount ;
62
62
if ($ code != 'subtotal ' ) {
@@ -77,7 +77,7 @@ public function setTotalAmount($code, $amount)
77
77
public function setBaseTotalAmount ($ code , $ amount )
78
78
{
79
79
/* (Fixes issue #18027) Round the total amount to 4 decimal places, to avoid floating point overflows */
80
- $ amount = is_float ($ amount ) ? ( float ) number_format ( $ amount , 4 , " . " , "" ) : $ amount ;
80
+ $ amount = is_float ($ amount ) ? round ( $ amount , 4 ) : $ amount ;
81
81
82
82
$ this ->baseTotalAmounts [$ code ] = $ amount ;
83
83
if ($ code != 'subtotal ' ) {
You can’t perform that action at this time.
0 commit comments