File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
app/code/Magento/Quote/Model/Quote/Address Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -56,7 +56,7 @@ public function __construct(
5656 public function setTotalAmount ($ code , $ amount )
5757 {
5858 /* (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 ;
6060
6161 $ this ->totalAmounts [$ code ] = $ amount ;
6262 if ($ code != 'subtotal ' ) {
@@ -77,7 +77,7 @@ public function setTotalAmount($code, $amount)
7777 public function setBaseTotalAmount ($ code , $ amount )
7878 {
7979 /* (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 ;
8181
8282 $ this ->baseTotalAmounts [$ code ] = $ amount ;
8383 if ($ code != 'subtotal ' ) {
You can’t perform that action at this time.
0 commit comments